Spaces:
Running
Running
Commit
·
d651008
1
Parent(s):
bdde6cf
Update main.py
Browse files
main.py
CHANGED
@@ -69,14 +69,9 @@ def proxy(url):
|
|
69 |
print('Cleaned URL:', clean_url)
|
70 |
|
71 |
try:
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
return Response(req.content, content_type=req.headers['content-type'])
|
76 |
-
else:
|
77 |
-
req = requests.get(clean_url, headers=headers, stream=True, timeout=15)
|
78 |
-
logging.info(f"Status Code: {req.status_code}, Response Headers: {req.headers}")
|
79 |
-
return Response(req.iter_content(chunk_size=2048), content_type=req.headers['content-type'])
|
80 |
except:
|
81 |
session['exception_urls'].append(url)
|
82 |
save_exception_urls(session['exception_urls'])
|
|
|
69 |
print('Cleaned URL:', clean_url)
|
70 |
|
71 |
try:
|
72 |
+
req = requests.get(clean_url, headers=headers, stream=True, timeout=15)
|
73 |
+
logging.info(f"Status Code: {req.status_code}, Response Headers: {req.headers}")
|
74 |
+
return Response(req.iter_content(chunk_size=2048), content_type=req.headers['content-type'])
|
|
|
|
|
|
|
|
|
|
|
75 |
except:
|
76 |
session['exception_urls'].append(url)
|
77 |
save_exception_urls(session['exception_urls'])
|