Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UC Mode detected by fnac.com #1760

Closed
donggoing opened this issue Feb 19, 2023 · 9 comments
Closed

UC Mode detected by fnac.com #1760

donggoing opened this issue Feb 19, 2023 · 9 comments
Labels
external Outside SeleniumBase's scope. / Ask somewhere else. UC Mode Undetected Chromedriver Mode (--uc)

Comments

@donggoing
Copy link

It seems to be detected by geetest with undetected_chromedriver. Example:

from seleniumbase import SB
with SB(undetectable=True, uc_cdp_events=True) as sb:
    sb.open("https://www.fnac.com/mp46660382")
    input('Press Enter to continue...')

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

@mdmintz mdmintz changed the title Detected by geetest? UC Mode detected by fnac.com Feb 19, 2023
@mdmintz mdmintz added the external Outside SeleniumBase's scope. / Ask somewhere else. label Feb 19, 2023
@mdmintz
Copy link
Member

mdmintz commented Feb 19, 2023

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: ultrafunkamsterdam/undetected-chromedriver#912

@mdmintz mdmintz closed this as completed Feb 19, 2023
@donggoing
Copy link
Author

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.

@mdmintz
Copy link
Member

mdmintz commented Feb 19, 2023

That website saves IP Addresses, so if it already detected you once, it'll detect you even if not using Selenium.

@donggoing
Copy link
Author

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! ).

@mdmintz
Copy link
Member

mdmintz commented Feb 19, 2023

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.)

@donggoing
Copy link
Author

Here is the normal chrome:

20230220_102019.mp4

And here is sbase with uc: (In this case, i don not refresh)

20230220_102104.mp4

And here is with a new ip, i dont refresh but try to open another page:

20230220_102533.mp4

@mdmintz
Copy link
Member

mdmintz commented Feb 20, 2023

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.

@donggoing
Copy link
Author

All right, thanks a lot for your real-time reply.

@z724133545
Copy link

你好 可以加个好友一起研究吗

@mdmintz mdmintz added the UC Mode Undetected Chromedriver Mode (--uc) label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Outside SeleniumBase's scope. / Ask somewhere else. UC Mode Undetected Chromedriver Mode (--uc)
Projects
None yet
Development

No branches or pull requests

3 participants