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: Video 3 is now on YouTube! #3029

Closed
mdmintz opened this issue Aug 15, 2024 · 4 comments
Closed

UC Mode: Video 3 is now on YouTube! #3029

mdmintz opened this issue Aug 15, 2024 · 4 comments
Assignees
Labels
News / Announcements News Tutorials & Learning Tutorial videos and blog posts UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode

Comments

@mdmintz
Copy link
Member

mdmintz commented Aug 15, 2024

UC Mode: Video 3 is now on YouTube:

https://www.youtube.com/watch?v=-EpZlhGWo9k

@mdmintz mdmintz added News / Announcements News Tutorials & Learning Tutorial videos and blog posts labels Aug 15, 2024
@mdmintz mdmintz self-assigned this Aug 15, 2024
@mdmintz mdmintz pinned this issue Aug 15, 2024
@mdmintz mdmintz added the UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode label Aug 21, 2024
@mdmintz
Copy link
Member Author

mdmintz commented Aug 21, 2024

Full method list so far:

driver.uc_open(url)

driver.uc_open_with_tab(url)

driver.uc_open_with_reconnect(url, reconnect_time=None)

driver.uc_open_with_disconnect(url, timeout=None)

driver.reconnect(timeout)

driver.disconnect()

driver.connect()

driver.uc_click(
    selector, by="css selector",
    timeout=settings.SMALL_TIMEOUT, reconnect_time=None)

driver.uc_gui_press_key(key)

driver.uc_gui_press_keys(keys)

driver.uc_gui_write(text)

driver.uc_gui_click_x_y(x, y, timeframe=0.25)

driver.uc_gui_click_captcha(frame="iframe", retry=False, blind=False)
# driver.uc_gui_click_cf(frame="iframe", retry=False, blind=False)
# driver.uc_gui_click_rc(frame="iframe", retry=False, blind=False)

driver.uc_gui_handle_captcha(frame="iframe")
# driver.uc_gui_handle_cf(frame="iframe")
# driver.uc_gui_handle_rc(frame="iframe")

@ArchLinuxAddict
Copy link

ok this video was the best i watched so far and you said that google recaptcha is better than cloudflare yeah you are right but there is also a work around for google captcha bypass actually
just switch to iframe click in checkbox and click the headphone icon after that get the audio and using speech to text api we can convert that speech to text and kabooom done even google captcha cant stand a chance lol🤣
if its uc mode it will be even more good bypassing

@furjac
Copy link

furjac commented Oct 14, 2024

@mdmintz make this a function and add it to sb if possible its awesome
and thanks for the idea @ArchLinuxAddict

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import requests
from wit import Wit
import time

options = webdriver.ChromeOptions() 
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options)
driver.get("https://www.google.com/recaptcha/api2/demo")
WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"iframe[src^='https://www.google.com/recaptcha/api2/anchor']")))
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "span#recaptcha-anchor"))).click()
driver.switch_to.default_content()
WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"/html/body/div[2]/div[4]/iframe")))
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div[2]/div[1]/div[1]/div[2]/button"))).click()
# Get audio's link
t = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, 'rc-audiochallenge-tdownload')))
t = t.find_element(By.TAG_NAME, 'a')
t = t.get_attribute('href')

# Download audio file
r = requests.get(t, allow_redirects=True)
open('audio.mp3', 'wb').write(r.content)

def transcribe_audio_to_text(audio_file_path, wit_token):
    client = Wit(access_token=wit_token)

    with open(audio_file_path, 'rb') as audio_file:
        response = client.speech(audio_file, {'Content-Type': 'audio/mpeg'})

    return response.get('text', '')

transcription = transcribe_audio_to_text('audio.mp3','SERVER_API_Token') #wit is completely free no limits
WebDriverWait(driver,10).until(EC.presence_of_element_located((By.ID, 'audio-response'))).send_keys(transcription)
WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.CLASS_NAME, 'verify-button-holder'))).click()
time.sleep(20)

@mdmintz mdmintz unpinned this issue Nov 27, 2024
@mdmintz mdmintz closed this as completed Nov 27, 2024
@mdmintz
Copy link
Member Author

mdmintz commented Nov 27, 2024

The new video (Undetectable Automation 4) is now available on YouTube: #3296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
News / Announcements News Tutorials & Learning Tutorial videos and blog posts UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode
Projects
None yet
Development

No branches or pull requests

3 participants