Spaces:
Running
Running
Commit
·
5b6d1b9
1
Parent(s):
572f8cd
Update main.py
Browse files
main.py
CHANGED
@@ -37,7 +37,7 @@ def proxy(url):
|
|
37 |
|
38 |
headers = {'User-Agent': 'Mozilla/5.0'}
|
39 |
try:
|
40 |
-
req = requests.get(f'http://{url}', headers=headers, stream=True, timeout=
|
41 |
content_type = req.headers['content-type']
|
42 |
|
43 |
return Response(req.iter_content(chunk_size=10*1024), content_type=content_type)
|
|
|
37 |
|
38 |
headers = {'User-Agent': 'Mozilla/5.0'}
|
39 |
try:
|
40 |
+
req = requests.get(f'http://{url}', headers=headers, stream=True, timeout=20)
|
41 |
content_type = req.headers['content-type']
|
42 |
|
43 |
return Response(req.iter_content(chunk_size=10*1024), content_type=content_type)
|