From eb56e43d090f991d7f576c43018f3daff0c4d8b8 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 27 Oct 2018 23:18:13 +1000 Subject: [PATCH] imports --- login.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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+"))