Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|