undetected-chromedriver
undetected-chromedriver copied to clipboard
[NoDriver] Fetch.requestPaused not working
The code below simply hangs instead of continuing.
async def receive_handler(event: cdp.fetch.RequestPaused):
print(event.resource_type)
return cdp.fetch.continue_request(request_id=event.request_id)
async def main():
options = Options()
service = Service('C:\Program Files\Google\Chrome\Application\chrome.exe')
driver = await start(
service=service,
options=options,
)
cdp.fetch.enable()
tab = driver.main_tab
tab.add_handler(cdp.fetch.RequestPaused, receive_handler)
page = await driver.get('https://abrahamjuliot.github.io/creepjs/')
input("Press Enter to continue...")
await page.close()
if __name__ == '__main__':
loop().run_until_complete(main())