mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 23:00:20 +00:00
Fix merge errors on HTMLSession
This commit is contained in:
committed by
Alessandro Romano
parent
5cc1ca4a70
commit
d0a5642de7
+2
-2
@@ -646,7 +646,7 @@ class HTMLSession(requests.Session):
|
||||
amongst other things.
|
||||
"""
|
||||
|
||||
def __init__(self, mock_browser=True, verify=False):
|
||||
def __init__(self, mock_browser=True, verify=False, browser_args=['--no-sandbox']):
|
||||
super(HTMLSession, self).__init__()
|
||||
|
||||
# Mock a web browser's user agent.
|
||||
@@ -681,7 +681,7 @@ class HTMLSession(requests.Session):
|
||||
def browser(self):
|
||||
if not hasattr(self, "_browser"):
|
||||
self.loop = asyncio.get_event_loop()
|
||||
self._browser = self.loop.run_until_complete(pyppeteer.launch(ignoreHTTPSErrors=not(self.verify), headless=True, args=['--no-sandbox']))
|
||||
self._browser = self.loop.run_until_complete(pyppeteer.launch(ignoreHTTPSErrors=not(self.verify), headless=True, args=self.__browser_args))
|
||||
return self._browser
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in New Issue
Block a user