mirror of
https://github.com/thegeneralist01/archivr
synced 2026-05-30 08:36:47 +02:00
chore: add isolate_cookies script
Add `isolate_cookies` script for creating Twitter credentials file
This commit is contained in:
parent
6bee5adfdd
commit
51e986b6b2
1 changed files with 13 additions and 0 deletions
13
vendor/twitter/scripts/isolate_cookies
vendored
Executable file
13
vendor/twitter/scripts/isolate_cookies
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
cookie_str = input("Input your cookies in the Header String format: ")
|
||||
|
||||
cookie_dict = dict(item.split("=", 1) for item in cookie_str.split(";"))
|
||||
|
||||
output_cookies = {}
|
||||
auth_token = cookie_dict['auth_token']
|
||||
ct0 = cookie_dict['ct0']
|
||||
|
||||
login_string = f"auth_token={auth_token};ct0={ct0}"
|
||||
|
||||
with open("creds.txt", "w") as file:
|
||||
file.write(login_string)
|
||||
Loading…
Add table
Add a link
Reference in a new issue