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 about this issue?
update:
Thanks to @DarkKnight and @CrazyChucky,
But in fact the requested HTML element has not changed yet:
<li id="about" class="tier-1 element-1 " aria-haspopup="true">
<a href="/about/" title="" class="">About</a>
<ul class="subnav menu" role="menu" aria-hidden="true">
<li class="tier-2 element-1" role="treeitem"><a href="/about/apps/" title="">Applications</a></li>
<li class="tier-2 element-2" role="treeitem"><a href="/about/quotes/" title="">Quotes</a></li>
<li class="tier-2 element-3" role="treeitem"><a href="/about/gettingstarted/" title="">Getting Started</a></li>
<li class="tier-2 element-4" role="treeitem"><a href="/about/help/" title="">Help</a></li>
<li class="tier-2 element-5" role="treeitem"><a href="http://brochure.getpython.info/" title="">Python Brochure</a></li>
</ul>
</li>