ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.62k stars 1.14k forks source link

Logging - possible to get Network.getResponseBody? #478

Open dreadedhamish opened 2 years ago

dreadedhamish commented 2 years ago

I've successfully implemented undetected-chrome driver (life-saver!) I'm using the code from the documentation to log events, and I've filtered the responses for the ones I'm targeting, and I now have a list of requestIds.

Chrome DevTools Protocol has a function called "Network.getResponseBody" which requires a request ID.

Is there any way to use Network.getResponseBody with the built-in functions?

If not, then I'm guessing my alternatives would be a) selenium-wire, or b) a chrome developer tools library?

dreadedhamish commented 2 years ago

Selenium-wire is getting flagged by cloudflare unfortunately. https://github.com/wkeeling/selenium-wire/issues/215

elliotbrack commented 2 years ago

Yes. body = driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': req_id})['body']