Author SHA1 Message Date
TheRaiwy 19a6c81e51 Auto-zoom out 1% when Persona says 'Move further away'
tests / test (push) Successful in 6s
tests / release (push) Successful in 6s
2026-07-10 20:54:54 +03:00
TheRaiwy f0a6b79a82 Retry on all errors (timeouts, crashes) instead of giving up
tests / test (push) Successful in 5s
tests / release (push) Successful in 6s
2026-07-10 20:47:57 +03:00
TheRaiwy 146609bbae Use CDP (execute_cdp_cmd) to set httpOnly cookie with fallback
tests / test (push) Successful in 5s
tests / release (push) Successful in 5s
2026-07-10 20:38:42 +03:00
TheRaiwy cd712e992d Fix cookie login: add path/secure attrs, check auth before setting
tests / test (push) Successful in 5s
tests / release (push) Successful in 5s
2026-07-10 19:56:23 +03:00
TheRaiwy 872acb8449 Dismiss modal dialogs before interacting with login form
tests / test (push) Successful in 6s
tests / release (push) Successful in 5s
2026-07-10 19:55:10 +03:00
TheRaiwy f161dbbbd5 Auto-retry on verification timeout / iframe not found
tests / test (push) Successful in 5s
tests / release (push) Successful in 6s
2026-07-10 19:43:51 +03:00
TheRaiwy b29b438df3 Fix: selfie button fallback, center detection, remove pinned Chrome version
tests / test (push) Successful in 6s
tests / release (push) Successful in 5s
2026-07-10 19:39:31 +03:00
TheRaiwy 4798f706b8 More reliable XPath for Continue with camera button
tests / test (push) Successful in 6s
tests / release (push) Successful in 7s
2026-07-10 18:52:17 +03:00
+61 -13
View File
@@ -311,12 +311,19 @@ def _cookie_login(driver, cookie: str) -> bool:
except Exception:
pass
try:
driver.add_cookie({"name": ".ROBLOSECURITY", "value": cookie, "domain": ".roblox.com"})
driver.get("https://www.roblox.com/home")
time.sleep(3)
return "/login" not in driver.current_url
driver.execute_cdp_cmd("Network.setCookie", {
"name": ".ROBLOSECURITY",
"value": cookie,
"domain": ".roblox.com",
"path": "/",
"secure": True,
"httpOnly": True,
})
except Exception:
return False
driver.add_cookie({"name": ".ROBLOSECURITY", "value": cookie, "domain": ".roblox.com"})
driver.get("https://www.roblox.com/home")
time.sleep(4)
return "/login" not in driver.current_url
def process_account(driver, acc: dict, donor_video: Path | None,
@@ -346,6 +353,17 @@ def process_account(driver, acc: dict, donor_video: Path | None,
except Exception:
pass
# close any modal dialogs blocking the login form
for _ in range(10):
try:
modal = driver.find_element(By.XPATH, "//h4[@class='modal-title']/ancestor::div[contains(@class, 'modal')]")
close_btn = modal.find_element(By.XPATH, ".//button[contains(@class, 'close')]")
close_btn.click()
log.info("Dismissed login modal")
time.sleep(1)
except Exception:
break
username_input = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "login-username")))
ActionChains(driver).move_to_element(username_input).pause(0.3).perform()
time.sleep(0.1); username_input.click(); time.sleep(0.1); username_input.clear()
@@ -390,7 +408,9 @@ def process_account(driver, acc: dict, donor_video: Path | None,
except Exception:
pass
camera_btn = WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.XPATH, "//span[text()='Continue with camera']/ancestor::button")))
camera_btn = WebDriverWait(driver, 15).until(
EC.element_to_be_clickable((By.XPATH, "//button[contains(@class, 'age-verification-button')]"))
)
try:
camera_btn.click()
except Exception:
@@ -430,8 +450,8 @@ def process_account(driver, acc: dict, donor_video: Path | None,
)
log.info("Persona iframe found")
except Exception:
log.warning("Persona widget iframe not found")
return False
log.warning("Persona widget iframe not found, will retry")
return True
if frames_b64 is None and donor_video:
w, h = _get_video_size(donor_video)
@@ -547,6 +567,7 @@ def process_account(driver, acc: dict, donor_video: Path | None,
_draw();
}};
window.__seekDirection = function(dir) {{ _currentDir = dir; }};
window.__zoomOut = function() {{ _scaleX *= 0.99; _scaleY *= 0.99; }};
if (navigator.mediaDevices) {{
navigator.mediaDevices.getUserMedia = function(constraints) {{
@@ -585,6 +606,13 @@ def process_account(driver, acc: dict, donor_video: Path | None,
log.info("Clicked selfie Continue")
time.sleep(3)
break
except Exception:
pass
try:
driver.find_element(By.XPATH, "//button[contains(@data-test, 'selfie') or contains(@aria-label, 'camera')]").click()
log.info("Clicked selfie Continue (fallback)")
time.sleep(3)
break
except Exception:
time.sleep(1)
@@ -593,12 +621,20 @@ def process_account(driver, acc: dict, donor_video: Path | None,
try:
alert = driver.find_element(By.XPATH, "//span[@role='alert']")
txt = alert.text.lower()
if "center" in txt or "центр" in txt:
if "center" in txt or "центр" in txt or "look" in txt:
driver.execute_script("window.__startVideo();")
log.info("Center instruction detected, video started")
break
except Exception:
pass
try:
body = driver.find_element(By.TAG_NAME, "body")
if "center" in body.text.lower() or "центр" in body.text.lower() or "look straight" in body.text.lower():
driver.execute_script("window.__startVideo();")
log.info("Center instruction detected (body fallback), video started")
break
except Exception:
pass
time.sleep(1)
end_time = time.time() + 120
@@ -610,6 +646,10 @@ def process_account(driver, acc: dict, donor_video: Path | None,
log.info("Photo rejected, restarting browser")
driver.switch_to.default_content()
return True
if "further away" in body.lower() or "move back" in body.lower():
driver.execute_script("window.__zoomOut();")
log.info("Zoomed out (further away detected)")
time.sleep(1)
if "Session expired" in body:
log.info("Session expired detected during verification")
driver.switch_to.default_content()
@@ -660,9 +700,9 @@ def process_account(driver, acc: dict, donor_video: Path | None,
except Exception:
pass
log.info("No decline message — pending (wait for days)")
log.info("Verification timed out — restarting")
save_result(acc, "pending", "no result in 120s loop")
return False
return True
def ensure_files() -> None:
@@ -729,7 +769,7 @@ def _process_one(tid: int, acc: dict,
driver = None
try:
with _chrome_lock:
driver = uc.Chrome(options=options, headless=False, version_main=149)
driver = uc.Chrome(options=options, headless=False)
result = process_account(driver, acc, donor_video, frames_b64, fw, fh, dir_ranges, speed_multiplier)
if result == "verified":
log.info("[T%d] Account verified", tid)
@@ -740,7 +780,11 @@ def _process_one(tid: int, acc: dict,
continue
break
except Exception as e:
log.error("[T%d] Error: %s", tid, e)
log.error("[T%d] Error: %s (attempt %d/%d)", tid, e, attempt + 1, max_retries)
if attempt + 1 < max_retries:
log.info("[T%d] Retrying after error...", tid)
time.sleep(5)
continue
break
finally:
if TEST_MODE:
@@ -750,6 +794,10 @@ def _process_one(tid: int, acc: dict,
driver.quit()
except Exception:
pass
try:
driver.__class__.__del__ = lambda s: None
except Exception:
pass
if pproxy_proc:
pproxy_proc.terminate()