【发布时间】:2017-09-15 18:06:06
【问题描述】:
我尝试了以下方法:
import urllib
link = 'https://automatetheboringstuff.com/chapter7/'
f = urllib.request.urlopen(link)
myfile = f.read()
print(myfile)
但这似乎只是返回页面的源而不是文本内容。
【问题讨论】:
-
你需要
BeautifulSoup -
正确吗
urllib.request.urlopen(link)?
标签: python python-3.x text extract urllib