Python 请求html模块没有响应
我是一个新的Python用户,我正在尝试使用请求html模块进行web刮取。我正在和Jupyter一起开发mac电脑。我打字的时候Python 请求html模块没有响应,python,web-scraping,python-requests-html,Python,Web Scraping,Python Requests Html,我是一个新的Python用户,我正在尝试使用请求html模块进行web刮取。我正在和Jupyter一起开发mac电脑。我打字的时候 pip install requests-html from requests-html import HTMLSession 看起来我可以安装该模块,因为我收到以下消息: Requirement already satisfied: requests-html in /Users/usr/opt/anaconda3/lib/python3.8/site-pac
pip install requests-html
from requests-html import HTMLSession
看起来我可以安装该模块,因为我收到以下消息:
Requirement already satisfied: requests-html in /Users/usr/opt/anaconda3/lib/python3.8/site-packages (0.10.0)
然后我打字
pip install requests-html
from requests-html import HTMLSession
并获取以下错误:
File "<ipython-input-6-af86b1357aeb>", line 1
from requests-html import HTMLSession
^
SyntaxError: invalid syntax
文件“”,第1行
从请求html导入HTMLSession
^
SyntaxError:无效语法
如果您能帮我解决这个问题,我将不胜感激。这是来自请求的
而不是来自请求的html导入HTMLSession
阅读更多。好的,非常感谢。它起作用了!