MCPcopy
hub / github.com/psf/requests-html / close

Method close

requests_html.py:733–737  ·  view source on GitHub ↗

If a browser was created close it first.

(self)

Source from the content-addressed store, hash-verified

731 return self._browser
732
733 def close(self):
734 """ If a browser was created close it first. """
735 if hasattr(self, "_browser"):
736 self.loop.run_until_complete(self._browser.close())
737 super().close()
738
739
740class AsyncHTMLSession(BaseSession):

Callers 6

test_browser_sessionFunction · 0.95
_async_renderMethod · 0.45
closeMethod · 0.45
test_async_renderFunction · 0.45
test_bare_arenderFunction · 0.45
test_bare_js_async_evalFunction · 0.45

Calls

no outgoing calls

Tested by 4

test_browser_sessionFunction · 0.76
test_async_renderFunction · 0.36
test_bare_arenderFunction · 0.36
test_bare_js_async_evalFunction · 0.36