Omnibus commited on
Commit
813378c
·
1 Parent(s): 10b36b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -398,7 +398,12 @@ def itt(url):
398
  print(f'{url}.{i}.{d}.pdf')
399
  print(r.status_code)
400
  if r.status_code == 429:
401
- time.sleep(30)
 
 
 
 
 
402
  if r.status_code == 200:
403
  out.append(f'{url}.{i}.{d}.pdf')
404
  yield out
 
398
  print(f'{url}.{i}.{d}.pdf')
399
  print(r.status_code)
400
  if r.status_code == 429:
401
+ while True:
402
+ r=requests.get(f'{url}.{i}.{d}.pdf')
403
+ if r.status_code==429:
404
+ time.sleep(61)
405
+ else:
406
+ break
407
  if r.status_code == 200:
408
  out.append(f'{url}.{i}.{d}.pdf')
409
  yield out