BraydenMoore commited on
Commit
f0d5642
1 Parent(s): bc9708d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -69,7 +69,7 @@ from urllib.parse import urlparse, parse_qs
69
  def proxy(url):
70
  start_time = time.time()
71
 
72
- full_url = url
73
  query_string = request.query_string.decode("utf-8")
74
  if query_string:
75
  full_url += "?" + query_string
@@ -93,7 +93,7 @@ def proxy(url):
93
 
94
  end_time = time.time()
95
  elapsed_time = end_time - start_time
96
- print(f"\nTime taken for proxy: {elapsed_time} seconds\n")
97
 
98
  return Response(req.iter_content(chunk_size=1024), content_type=req.headers['content-type'])
99
 
@@ -118,7 +118,7 @@ def index():
118
  session['current_feed'] = id
119
 
120
  url = encode_url(url)
121
- url = url.replace('640x480','1280x960').replace("COUNTER",str(random.randint(1,1000000)))
122
  id = feed
123
  ip = ''.join(url.split('//')[-1]).split(':')[0]
124
  info = get_location(ip)
 
69
  def proxy(url):
70
  start_time = time.time()
71
 
72
+ full_url = url.replace("COUNTER",str(random.randint(1,1000000)))
73
  query_string = request.query_string.decode("utf-8")
74
  if query_string:
75
  full_url += "?" + query_string
 
93
 
94
  end_time = time.time()
95
  elapsed_time = end_time - start_time
96
+ print(f"\n{clean_url}\nTime taken for proxy: {elapsed_time} seconds\n")
97
 
98
  return Response(req.iter_content(chunk_size=1024), content_type=req.headers['content-type'])
99
 
 
118
  session['current_feed'] = id
119
 
120
  url = encode_url(url)
121
+ url = url.replace('640x480','1280x960')
122
  id = feed
123
  ip = ''.join(url.split('//')[-1]).split(':')[0]
124
  info = get_location(ip)