diff --git a/login.py b/login.py index 4198f49..dc9fb63 100644 --- a/login.py +++ b/login.py @@ -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+")) \ No newline at end of file +json.dump(cfg, open("config.json", "w+"))