Kartal Tibet
Kartal Tibet

Reputation: 45

requests-html module does not respond

I am a new Python user and I'm trying to web scrape with the requests-html module. I'm working on a mac with Jupyter. When I type

pip install requests-html

and it looks like I could install the Module because I get the following message:

Requirement already satisfied: requests-html in /Users/usr/opt/anaconda3/lib/python3.8/site-packages (0.10.0)

Then I type

from requests-html import HTMLSession

and get the following error:

  File "<ipython-input-6-af86b1357aeb>", line 1
    from requests-html import HTMLSession
                 ^
SyntaxError: invalid syntax

I would appreciate any help for solving this problem.

Upvotes: -1

Views: 516

Answers (1)

baduker
baduker

Reputation: 20042

It's from requests_html import HTMLSession not from requests-html import HTMLSession.

Read more here.

Upvotes: 2

Related Questions