Spaces:
Running
Running
Commit
·
0d7ea83
1
Parent(s):
11bbf7f
Update main.py
Browse files
main.py
CHANGED
@@ -77,11 +77,11 @@ def proxy(url):
|
|
77 |
req = requests.get(clean_url, headers=headers, stream=True, timeout=10)
|
78 |
logging.info(f"Status Code: {req.status_code}, Response Headers: {req.headers}")
|
79 |
return Response(req.iter_content(chunk_size=512), content_type=req.headers['content-type'])
|
80 |
-
except
|
81 |
session['exception_urls'].append(url)
|
82 |
save_exception_urls(session['exception_urls'])
|
83 |
print('Added to exceptions:',session['exception_urls'])
|
84 |
-
logging.error(f"Error in proxy
|
85 |
return send_file('static/error.png', mimetype='image/png')
|
86 |
|
87 |
|
|
|
77 |
req = requests.get(clean_url, headers=headers, stream=True, timeout=10)
|
78 |
logging.info(f"Status Code: {req.status_code}, Response Headers: {req.headers}")
|
79 |
return Response(req.iter_content(chunk_size=512), content_type=req.headers['content-type'])
|
80 |
+
except:
|
81 |
session['exception_urls'].append(url)
|
82 |
save_exception_urls(session['exception_urls'])
|
83 |
print('Added to exceptions:',session['exception_urls'])
|
84 |
+
logging.error(f"Error in proxy.")
|
85 |
return send_file('static/error.png', mimetype='image/png')
|
86 |
|
87 |
|