html.render()

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-02-27 11:16:47 -05:00
parent 7983d402d4
commit e334d254df
3 changed files with 37 additions and 60 deletions
+3 -3
View File
@@ -151,10 +151,10 @@ Let's grab some text that's rendered by JavaScript:
.. code-block:: pycon
>>> from requests_html import BrowserHTMLSession
>>> session = BrowserHTMLSession()
>>> r = session.get('http://python-requests.org/')
>>> r.html.render()
>>> r = session.get('http://python-requests.org')
>>> r.html.search('Python 2 will retire in only {months} months!')['months']
'<time>25</time>'