Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
146609bbae |
@@ -302,10 +302,8 @@ def save_result(acc: dict, category: str, msg: str = "") -> None:
|
|||||||
|
|
||||||
|
|
||||||
def _cookie_login(driver, cookie: str) -> bool:
|
def _cookie_login(driver, cookie: str) -> bool:
|
||||||
driver.get("https://www.roblox.com/home")
|
driver.get("https://www.roblox.com")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
if "/login" not in driver.current_url:
|
|
||||||
return True
|
|
||||||
try:
|
try:
|
||||||
accept = WebDriverWait(driver, 3).until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Accept All']")))
|
accept = WebDriverWait(driver, 3).until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Accept All']")))
|
||||||
accept.click()
|
accept.click()
|
||||||
@@ -313,19 +311,19 @@ def _cookie_login(driver, cookie: str) -> bool:
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
driver.add_cookie({
|
driver.execute_cdp_cmd("Network.setCookie", {
|
||||||
"name": ".ROBLOSECURITY",
|
"name": ".ROBLOSECURITY",
|
||||||
"value": cookie,
|
"value": cookie,
|
||||||
"domain": ".roblox.com",
|
"domain": ".roblox.com",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"secure": True,
|
"secure": True,
|
||||||
|
"httpOnly": True,
|
||||||
})
|
})
|
||||||
driver.get("https://www.roblox.com/home")
|
except Exception:
|
||||||
time.sleep(4)
|
driver.add_cookie({"name": ".ROBLOSECURITY", "value": cookie, "domain": ".roblox.com"})
|
||||||
return "/login" not in driver.current_url
|
driver.get("https://www.roblox.com/home")
|
||||||
except Exception as e:
|
time.sleep(4)
|
||||||
log.warning("Cookie login error: %s", e)
|
return "/login" not in driver.current_url
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def process_account(driver, acc: dict, donor_video: Path | None,
|
def process_account(driver, acc: dict, donor_video: Path | None,
|
||||||
|
|||||||
Reference in New Issue
Block a user