Rate limiting timeout removed, we will deal of it on Pixelfed
This commit is contained in:
parent
01d4a8539f
commit
2fc703e866
|
@ -225,7 +225,7 @@ def pixelfed_dlposts(acc_id, data):
|
|||
)
|
||||
|
||||
# do a comment as it supports larger descriptions
|
||||
if len(r.text) > 5:
|
||||
if r.status_code == 200 and len(r.text) > 5:
|
||||
ps = r.text.strip('/').split('/')
|
||||
status_id = ps[len(ps)-1]
|
||||
print('done | StatusID -> {}'.format(status_id))
|
||||
|
@ -249,9 +249,10 @@ def pixelfed_dlposts(acc_id, data):
|
|||
print('done')
|
||||
accposts.append(item['shortcode'])
|
||||
print('I| uploaded post {}:{} : OK'.format(acc_id, item['shortcode']))
|
||||
|
||||
# to avoid Pixelfed rate-limiting
|
||||
time.sleep(10)
|
||||
else:
|
||||
print(r.text)
|
||||
print(r.headers)
|
||||
return
|
||||
|
||||
db_set('posts', acc_id, accposts)
|
||||
|
||||
|
|
Loading…
Reference in New Issue