Author SHA1 Message Date
TheRaiwy 146609bbae Use CDP (execute_cdp_cmd) to set httpOnly cookie with fallback
tests / release (push) Successful in 5s
tests / test (push) Successful in 5s
2026-07-10 20:38:42 +03:00
+5 -7
View File
@@ -302,10 +302,8 @@ def save_result(acc: dict, category: str, msg: str = "") -> None:
def _cookie_login(driver, cookie: str) -> bool:
driver.get("https://www.roblox.com/home")
driver.get("https://www.roblox.com")
time.sleep(2)
if "/login" not in driver.current_url:
return True
try:
accept = WebDriverWait(driver, 3).until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Accept All']")))
accept.click()
@@ -313,19 +311,19 @@ def _cookie_login(driver, cookie: str) -> bool:
except Exception:
pass
try:
driver.add_cookie({
driver.execute_cdp_cmd("Network.setCookie", {
"name": ".ROBLOSECURITY",
"value": cookie,
"domain": ".roblox.com",
"path": "/",
"secure": True,
"httpOnly": True,
})
except Exception:
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
except Exception as e:
log.warning("Cookie login error: %s", e)
return False
def process_account(driver, acc: dict, donor_video: Path | None,