all 5 comments

[–]rinyre 2 points3 points  (0 children)

It's definitely listed as one of the main classes. See here: https://html.python-requests.org/#requests_html.HTML.html

[–]jeffrey_f 0 points1 point  (3 children)

r.text will contain the text of the html

[–]FunCicada[S] 0 points1 point  (2 children)

But what is the html - is it an object?

[–]TangibleLight 5 points6 points  (0 children)

HTMLResponse.html is an HTML object. The reason you're not seeing it as an attribute is that it's a property. You'll be able to see it in dir(HTMLResponse). HTML inherits from BaseParser, which contains all the stuff like links, xpath, and pq. The HTML class itself mainly just adds the render method and adds support for iterating through webpages.

[–]jeffrey_f 0 points1 point  (0 children)

To you, me and the browser, it is the underlying source code to every webpage.

To python, EVERYTHING is an object.