mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 23:00:20 +00:00
backwards compatibility
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
+5
-3
@@ -239,7 +239,7 @@ def user_agent(style=None):
|
||||
return useragent[style]
|
||||
|
||||
|
||||
class Session(requests.Session):
|
||||
class HTMLSession(requests.Session):
|
||||
"""A consumable session, for cookie persistience and connection pooling,
|
||||
amongst other things.
|
||||
"""
|
||||
@@ -271,7 +271,7 @@ class Session(requests.Session):
|
||||
return html_r
|
||||
|
||||
|
||||
class BrowserSession(Session):
|
||||
class BrowserHTMLSession(Session):
|
||||
"""A web-browser interpreted session (for JavaScript)."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -318,4 +318,6 @@ class BrowserSession(Session):
|
||||
|
||||
|
||||
# Backwards compatiblity.
|
||||
session = Session()
|
||||
session = HTMLSession()
|
||||
Session = HTMLSession
|
||||
BroserSession = BrowserHTMLSession
|
||||
Reference in New Issue
Block a user