Requests-HTML Confusion
In the tutorial, Kenneth has code along the lines of:
from requests_html import HTMLSession
session = HTMLSession()
r = session.get('websiteurl')
all_links = r.html.links # gets links on page
Now here's where I'm confused - the get() method in HTMLSession returns a Response object, but where is html being called from? The Response object doesn't seem to list html as an attribute or as a method. See here for what I'm looking at: https://html.python-requests.org/
Posted Aug 11, 2018, 5:04 PM UTC · edited
It's definitely listed as one of the main classes. See here: https://html.python-requests.org/#requests_html.HTML.html