Added upload all function with a timeout of 20 seconds
This commit is contained in:
parent
f4da72ceda
commit
44b6295017
|
@ -72,7 +72,12 @@ def update_igaccount(acc_id):
|
|||
threading.Thread(target=pixelfed_dlposts, args=(acc_id, data['graphql']['user'])).start()
|
||||
|
||||
def update_allaccounts():
|
||||
print('update all accounts')
|
||||
# update all accounts with a timeout of 20 seconds
|
||||
for acc_id in os.listdir('./db/accounts'):
|
||||
print('I| mirroring account "{}"...'.format(acc_id))
|
||||
update_igaccount(acc_id)
|
||||
time.sleep(30)
|
||||
print()
|
||||
|
||||
|
||||
def pixelfed_islogged(acc_id, accdata=None):
|
||||
|
@ -264,7 +269,7 @@ def md5sum(_str):
|
|||
# - much more info...
|
||||
def getig_user_data(acc_id):
|
||||
return json.loads(
|
||||
instagram_get('/{}/?__a=1'.format(acc_id), 120000)
|
||||
instagram_get('/{}/?__a=1'.format(acc_id))
|
||||
)
|
||||
|
||||
# runs a basic GET request emulating Tor Browser
|
||||
|
|
Loading…
Reference in New Issue