Closed SSujitX closed 6 months ago
I would start with the usual CAPTCHA bypass example for Steam and work from there: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_games.py
I would also avoid any kind of window maximization, as that makes Selenium detectable.
You'll have to work with the existing UC Mode examples to find a way, as your example requires logging in to a website with an existing account.
The problem is here. I checked all of the seleniumbase documents. I didn't find any solution. Can you please help me?
I've offer you the same advice as https://github.com/seleniumbase/SeleniumBase/issues/2792#issuecomment-2122725656:
For maximum stealth, combine UC Mode with pyautogui
and perform actions while disconnected. You can do driver.disconnect()
to disconnect the driver. Then perform the pyautogui
actions. Then driver.connect()
afterwards so that you can perform Selenium actions again.
You'll be able to scroll the page down with pyautogui
by using the down arrow key. A regular Selenium scroll can get you detected.
Thanks, @mdmintz , it's working with pyautogui.
I want to learn one more thing which is,
while True:
sb.driver.disconnect()
pyautogui.press('end')
sb.sleep(3)
sb.driver.connect()
elements = sb.find_elements (item_selector_main)
if elements:
for element in elements:
try:
item_name = element.find_element("css selector", "div.prefix").text.replace('★', '').strip()
except Exception:
item_name = None
print(item_name)
using the sb method I used find_elements for a list of items then when I used find_element only got one element from the list. why I need to pass "css selector"? also is there another way to write like in seleniumbase style?
Hello @mdmintz , I tried to scroll csfloat database after login in using steam. After 2 scrolls, the browser gets caught turnstile. I had to use a chrome profile because of signing in through steam.
HTML here
`from seleniumbase import SB import time import sys import os
def main():
if name == "main": main() `