undetected-chromedriver
undetected-chromedriver copied to clipboard
Avoiding Detection using Actions
It appears that the actions that I make is detected. For example, navigating to an element and clicking on it.
ActionChains(driver)\
.scroll_to_element(element)\
.move_to_element_with_offset(element, random.uniform(5, 10), random.uniform(5, 10))\
.pause(random.uniform(0.1, 0.3))\
.click()\
.perform()
Is there a better way to make actions like these? It is undetected when I use my mouse manually clicking (or using pyautogui), however once I use an Action, it is detected.
I have added pauses, and hovering / moving to offset, however it does not seem to work.
You're right sites are getting better at detecting non human reaction time, instant keystrokes, mouse not travelling, etc... Please check here for some "enhanced" actions I added to handle some of those issues.
Thank you @sebdelsol, appreciate it. Do you have any other tips for mouse clicks using Actions?
It depends a lot on the targeted site... I've stumbled upon on some that were sensible to too fast reaction or too fast keystrokes, other that timed their sliders, other that expected the mouse to travel through the page before a click... When it doesn't work, rely on common sense : what would an actual human do ?
@noodleman420 Have you found any solution so far for mouse movement other than pyautogui?
@xploader Nope, I believe most of the Selenium actions are detected with this specific antibot I am trying to avoid. I moved to using Playwright in JS for now.