BraydenMoore commited on
Commit
b9194d8
·
1 Parent(s): e3df782

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -32,11 +32,10 @@ def proxy(url):
32
  retries = 3
33
  while retries > 0:
34
  try:
35
- req = requests.get(f'http://{url}', stream=True, timeout=10)
36
  return Response(req.iter_content(chunk_size=10*1024), content_type=req.headers['content-type'])
37
  except requests.exceptions.RequestException as e:
38
  retries -= 1
39
- time.sleep(1)
40
  return send_file('static/error.png', mimetype='image/png')
41
 
42
  @app.route('/')
 
32
  retries = 3
33
  while retries > 0:
34
  try:
35
+ req = requests.get(f'http://{url}', stream=True)
36
  return Response(req.iter_content(chunk_size=10*1024), content_type=req.headers['content-type'])
37
  except requests.exceptions.RequestException as e:
38
  retries -= 1
 
39
  return send_file('static/error.png', mimetype='image/png')
40
 
41
  @app.route('/')