Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -232,7 +232,7 @@ def get_webshare_proxy(webshare_token):
|
|
| 232 |
"page": 1,
|
| 233 |
"page_size": 100,
|
| 234 |
},
|
| 235 |
-
timeout=
|
| 236 |
)
|
| 237 |
resp.raise_for_status()
|
| 238 |
|
|
@@ -311,7 +311,7 @@ def cors_proxy():
|
|
| 311 |
try:
|
| 312 |
txt_resp = requests.get(
|
| 313 |
cookie_txt_url,
|
| 314 |
-
timeout=
|
| 315 |
)
|
| 316 |
txt_resp.raise_for_status()
|
| 317 |
|
|
@@ -481,7 +481,7 @@ def cors_proxy_404(e):
|
|
| 481 |
|
| 482 |
if cookie_txt_url:
|
| 483 |
try:
|
| 484 |
-
txt_resp = requests.get(cookie_txt_url, timeout=
|
| 485 |
txt_resp.raise_for_status()
|
| 486 |
txt_cookies = parse_cookie_txt(txt_resp.text)
|
| 487 |
cookies.update(txt_cookies)
|
|
@@ -506,7 +506,7 @@ def cors_proxy_404(e):
|
|
| 506 |
data=request.get_data(),
|
| 507 |
cookies=cookies,
|
| 508 |
allow_redirects=False,
|
| 509 |
-
timeout=
|
| 510 |
)
|
| 511 |
except requests.RequestException:
|
| 512 |
return abort(502)
|
|
|
|
| 232 |
"page": 1,
|
| 233 |
"page_size": 100,
|
| 234 |
},
|
| 235 |
+
timeout=150,
|
| 236 |
)
|
| 237 |
resp.raise_for_status()
|
| 238 |
|
|
|
|
| 311 |
try:
|
| 312 |
txt_resp = requests.get(
|
| 313 |
cookie_txt_url,
|
| 314 |
+
timeout=100,
|
| 315 |
)
|
| 316 |
txt_resp.raise_for_status()
|
| 317 |
|
|
|
|
| 481 |
|
| 482 |
if cookie_txt_url:
|
| 483 |
try:
|
| 484 |
+
txt_resp = requests.get(cookie_txt_url, timeout=100)
|
| 485 |
txt_resp.raise_for_status()
|
| 486 |
txt_cookies = parse_cookie_txt(txt_resp.text)
|
| 487 |
cookies.update(txt_cookies)
|
|
|
|
| 506 |
data=request.get_data(),
|
| 507 |
cookies=cookies,
|
| 508 |
allow_redirects=False,
|
| 509 |
+
timeout=100,
|
| 510 |
)
|
| 511 |
except requests.RequestException:
|
| 512 |
return abort(502)
|