diff --git a/README.rst b/README.rst index 45b8ccb..2c0515d 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,9 @@ Make a GET request to 'python.org', using Requests: .. code-block:: pycon - >>> from requests_html import session + >>> import requests_html + >>> session = requests_html.Session() + >>> r = session.get('https://python.org/') Grab a list of all links on the page, as–is (anchors excluded): @@ -73,14 +75,14 @@ Select Elements within Elements: >>> about.find('a') [, , , , , ] - + Search for links within an element: .. code-block:: pycon >>> about.absolute_links {'http://brochure.getpython.info/', 'https://www.python.org/about/gettingstarted/', 'https://www.python.org/about/', 'https://www.python.org/about/quotes/', 'https://www.python.org/about/help/', 'https://www.python.org/about/apps/'} - + Search for text on the page: diff --git a/requests_html.py b/requests_html.py index a672721..b9df205 100644 --- a/requests_html.py +++ b/requests_html.py @@ -202,5 +202,3 @@ class Session(requests.Session): response.html = HTML(response=response) return response - -session = Session()