mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-27 14:01:07 +00:00
use access-token once retrived with login/pass
This commit is contained in:
parent
bea70c722c
commit
16212f800a
|
@ -99,11 +99,15 @@ if not os.path.isfile(instance+'.secret'):
|
||||||
print('failed to create app on instance '+instance)
|
print('failed to create app on instance '+instance)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
mastodon_api = Mastodon(access_token=mastodon+".secret")
|
||||||
|
except:
|
||||||
try:
|
try:
|
||||||
mastodon_api = Mastodon(
|
mastodon_api = Mastodon(
|
||||||
client_id=instance+'.secret',
|
client_id=instance+'.secret',
|
||||||
api_base_url='https://'+instance
|
api_base_url='https://'+instance
|
||||||
)
|
)
|
||||||
|
print('login')
|
||||||
mastodon_api.log_in(
|
mastodon_api.log_in(
|
||||||
username=mastodon,
|
username=mastodon,
|
||||||
password=passwd,
|
password=passwd,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user