This commit is contained in:
Lynne Megido 2018-10-27 23:18:13 +10:00
parent 449f245fe4
commit eb56e43d09
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

View file

@ -1,3 +1,6 @@
import json
from mastodon import Mastodon
scopes = ["read:statuses", "read:accounts", "read:follows", "write:statuses"]
cfg = json.load(open('config.json', 'r'))
@ -22,4 +25,4 @@ if "secret" not in cfg:
print("Open this URL: {}".format(client.auth_request_url(scopes=scopes)))
cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes)
json.dump(cfg, open("config.json", "w+"))
json.dump(cfg, open("config.json", "w+"))