Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 请求html模块没有响应_Python_Web Scraping_Python Requests Html - Fatal编程技术网

Python 请求html模块没有响应

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

我是一个新的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-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


阅读更多。

好的,非常感谢。它起作用了!