Closed RahilRehan closed 4 years ago
I can normally login with same details in my chrome browser. It used to perfectly worked two days ago. I did try recompiling, tried on linux and windows too and tried deleting the data folder too. sometimes it magically works and sometimes it throws the access denied error.
ok, following up. I just had a chat with educative support. I think they have introduced bot detection so to get rid of automation and scrapping.
I tried setting the userAgent on page, which did not work
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36';
await page.setUserAgent(userAgent);
Maybe this will work, I don't know typescript. Can you please have a look? https://www.npmjs.com/package/puppeteer-extra-plugin-stealth
Ok, so I found a solution. Basically educative uses recaptcha 3, which is quite intelligent. I replaced all chromium files with chrome installation in my pc, node_modules>pupeteer>local-chromium>win_build>chrome_win. That does the job, chrome is not getting flagged by recaptcha but like chromium.
I tried setting headless false, and this is what I saw
And here is the log 2020-08-27T05_55_28_150Z-debug.log
Maybe it is some error related to re-captcha? Please have a look.