How to read html from a url in python 3

后端 未结 6 1904
滥情空心
滥情空心 2020-12-08 02:13

I looked at previous similar questions and got only more confused.

In python 3.4, I want to read an html page as a string, given the url.

In perl I do this w

6条回答
  •  暖寄归人
    2020-12-08 02:38

    urllib.request.urlopen(url).read() should return you the raw HTML page as a string.

提交回复
热议问题