Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -413,8 +413,12 @@ def itt(url):
|
|
| 413 |
print(f'{url}.{i}.{d}_{p}.pdf')
|
| 414 |
print(r1.status_code)
|
| 415 |
if r1.status_code == 429:
|
| 416 |
-
|
| 417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 418 |
out.append(f'{url}.{i}.{d}_{p}.pdf')
|
| 419 |
yield out
|
| 420 |
yield out
|
|
|
|
| 413 |
print(f'{url}.{i}.{d}_{p}.pdf')
|
| 414 |
print(r1.status_code)
|
| 415 |
if r1.status_code == 429:
|
| 416 |
+
while True:
|
| 417 |
+
r1=requests.get(f'{url}.{i}.{d}.pdf')
|
| 418 |
+
if r1.status_code==429:
|
| 419 |
+
time.sleep(61)
|
| 420 |
+
else:
|
| 421 |
+
break if r1.status_code == 200:
|
| 422 |
out.append(f'{url}.{i}.{d}_{p}.pdf')
|
| 423 |
yield out
|
| 424 |
yield out
|