requests-html
>>> print(about.text)
About
Applications
Quotes
Getting Started
Help
Python Brochure
3.88
8
>>> about.find('a')
[<Element 'a' href='/about/' title='' class=''>, <Element 'a' href='/about/apps/' title=''>, <Element 'a' href='/about/quotes/' title=''>, <Element 'a' href='/about/gettingstarted/' title=''>, <Element 'a' href='/about/help/' title=''>, <Element 'a' href='http://brochure.getpython.info/' title=''>]
Thank you!
8
0
0
0
>>> about = r.html.find('#about', first=True)
Thank you!
0
0
0
0
>>> from requests_html import AsyncHTMLSession
>>> asession = AsyncHTMLSession()
>>> async def get_pythonorg():
... r = await asession.get('https://python.org/')
>>> async def get_reddit():
... r = await asession.get('https://reddit.com/')
>>> async def get_google():
... r = await asession.get('https://google.com/')
>>> result = session.run(get_pythonorg, get_reddit, get_google)
Thank you!
0
0
0
7
>>> about.attrs
{'id': 'about', 'class': ('tier-1', 'element-1'), 'aria-haspopup': 'true'}
Thank you!
7
0
4.33
3
>>> r.html.search('Python is a {} language')[0]
programming
Thank you!
3
0
4
9
>>> from requests_html import HTMLSession
>>> session = HTMLSession()
>>> r = session.get('https://python.org/')
Thank you!
9
0
Are there any code examples left?
New code examples in category Python