imports
This commit is contained in:
parent
449f245fe4
commit
eb56e43d09
1 changed files with 4 additions and 1 deletions
5
login.py
5
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+"))
|
||||
json.dump(cfg, open("config.json", "w+"))
|
||||
|
|
Loading…
Reference in a new issue