Closed donggoing closed 1 year ago
For starters, that website through a captcha even when not using Selenium, and also blocked for not using Selenium:
Why this blocking? Something about the behaviour of the browser has caught our attention.
There are various possible explanations for this:
* you are browsing and clicking at a speed much faster than expected of a human being
* something is preventing Javascript from working on your computer
* there is a robot on the same network as you
Based on this, it has nothing to do with UC Mode, but other factors if blocked when using a regular browser.
Already discussed here: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/912
The situation I encountered was that when using a regular browser to visit and refresh the page, it would display normally. But when using Selenium to visit the page, it would appear as I described: after refreshing, it would jump to the CAPTCHA page and then whether manual or automated verification, it would be detected as a bot, and the shows you have been blocked.
That website saves IP Addresses, so if it already detected you once, it'll detect you even if not using Selenium.
But what i described happened with the same ip. When not using selenium, i can visit, otherwise whether manual or automated verification, it would be detected as a bot, and the shows i have been blocked(after refreshing or jump to other page of fnac.com. important! ).
Even with regular undetected-chromedriver, one cannot simply refresh the page. Detection could get triggered unless performing other actions, such as seen here: https://github.com/ultrafunkamsterdam/undetected-chromedriver/blob/bf7dcf8b5713020de7454844fb80036b8c456503/undetected_chromedriver/cdp.py#L90
(That shows the webdriver get()
method being overridden with new functionality.)
Here is the normal chrome:
And here is sbase with uc: (In this case, i don not refresh)
And here is with a new ip, i dont refresh but try to open another page:
If you need to refresh the page, open a new driver in UC Mode. That website looks like it knows how to detect Selenium from a page refresh. Maybe https://github.com/ultrafunkamsterdam/undetected-chromedriver has other ideas, but there is little more I can do to improve the anti-detection abilities at this point.
All right, thanks a lot for your real-time reply.
你好 可以加个好友一起研究吗
It seems to be detected by geetest with undetected_chromedriver. Example:
You can open the page for the first time. But when you refresh it, it will come to the captcha page, and even with manual solving, it will be detected and shows you have been blocked.
Env: SeleniumBase 4.13.0 python 3.8.16