Python
Selenium Wire
Kyle79
2022. 12. 11. 14:43
https://pypi.org/project/selenium-wire/
selenium-wire
Extends Selenium to give you the ability to inspect requests made by the browser.
pypi.org
for s in chrome.get_requests():
if s.response and s.response.status_code == 200
if 'gzip' in s.response.headers.get('Content-Encoding', '').lower():
api_response_body = gzip.decompress(s.response.body)
set_api_headers = dict(s.headers)
else:
api_response_body = s.response.body