Add /sync_x command with X bookmarks import flow

This commit is contained in:
TheGeneralist 2026-02-17 20:33:28 +01:00
parent 79073b7a2c
commit 874f3ec570
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
8 changed files with 975 additions and 2 deletions

View file

@ -0,0 +1,19 @@
cookie_str = input("Input your cookies in the Header String format: ").strip()
cookie_dict = {}
for item in cookie_str.split(";"):
part = item.strip()
if not part or "=" not in part:
continue
key, value = part.split("=", 1)
cookie_dict[key.strip()] = value.strip()
auth_token = cookie_dict.get("auth_token", "")
ct0 = cookie_dict.get("ct0", "")
if not auth_token or not ct0:
raise SystemExit("Missing auth_token or ct0 in the provided cookie header.")
login_string = f"auth_token={auth_token};ct0={ct0}"
with open("creds.txt", "w") as file:
file.write(login_string)