Skip to content

failed to get elements #479

@fengsanyunyan

Description

@fengsanyunyan

I'm new to requests-html and just installed several days ago.
when followed the Tutorial :

from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://python.org/')
about = r.html.find('#about', first=True)
print(about.text)

The expected output as Tutorial described is :

About
Applications
Quotes
Getting Started
Help
Python Brochure

But actually I got the following:

About
Applications
Quotes
Getting Started
Help
Python Brochure
Downloads
All releases
Source code
Windows
macOS
Other Platforms
License
Alternative Implementations
Documentation
.
.
.
Submit Website Bug
Status
Copyright ©2001-2021.  Python Software Foundation  Legal Statements  Privacy Policy  Powered by Heroku
window.jQuery || document.write('<script src="/static/js/libs/jquery-1.8.2.min.js"><\/script>') window.jQuery || document.write('<script src="/static/js/libs/jquery-ui-1.12.1.min.js"><\/script>')

which is from element <li id="about" ... to the end of the whole html document.

anyone konws solution of this issue?

@kennethreitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions