Open getter3 opened 4 years ago
I also encountered this problem and could not solve it!
I also encountered this problem and could not solve it!
Well, I have switched to use puppeteer instead XD
Face the same problem.
If you dont use page.setRequestInterception(True)
, interception can also be done. Have a try.
# await page.setRequestInterception(True)
page.on('request', onMediaInfoIntercept)
Hi, I suffer the same problem. Are there any update on this issue? Can anyone point me a way to fix it or any workaround? I am using a headless browser to automatic some tasks and I want to block loading of ads to improve the performance.
same problem here! it seems the page.on('request')
callbacks dont get called. I looked into the code, and all seems correct when emitting those requests in Page and NetworkManager
@wonghang simply install an adblocker before launching the headless browser! Here is a version from the nodejs implementation (works the same with python)
https://gist.github.com/sindresorhus/bca2f7d0c8b31205fa3c9f328d548c70
I worked on a small project and used this library for quite a week time.
I have tried to intercept the request of the page for analyze I wish to do it in non-headless mode, but strange behavior is seen
First of all, after setting Page.setRequestInterception() to True, Page.goto seems never returned Also there is seems no network after a while. This is essential as I am going to have some interaction manually on the browser
Here is my code, the code stuck at 'finished loading page':