Spaces:
Running
Running
Stop printing so much
Browse files
main.py
CHANGED
@@ -40,7 +40,6 @@ def get_location(ip):
|
|
40 |
end_time = time.time()
|
41 |
|
42 |
elapsed_time = end_time - start_time
|
43 |
-
print(f"\nTime taken for get_location: {elapsed_time} seconds\n")
|
44 |
|
45 |
if location:
|
46 |
return {'country': location['country']['names']['en'] if 'country' in location else 'unknown country',
|
@@ -94,12 +93,10 @@ def proxy(url):
|
|
94 |
|
95 |
end_time = time.time()
|
96 |
elapsed_time = end_time - start_time
|
97 |
-
print(f"\n{clean_url}\nTime taken for proxy: {elapsed_time} seconds\n")
|
98 |
|
99 |
return Response(req.iter_content(chunk_size=1024), content_type=req.headers['content-type'])
|
100 |
|
101 |
except Exception as e:
|
102 |
-
print(e)
|
103 |
return Response("Error", status=500)
|
104 |
|
105 |
|
|
|
40 |
end_time = time.time()
|
41 |
|
42 |
elapsed_time = end_time - start_time
|
|
|
43 |
|
44 |
if location:
|
45 |
return {'country': location['country']['names']['en'] if 'country' in location else 'unknown country',
|
|
|
93 |
|
94 |
end_time = time.time()
|
95 |
elapsed_time = end_time - start_time
|
|
|
96 |
|
97 |
return Response(req.iter_content(chunk_size=1024), content_type=req.headers['content-type'])
|
98 |
|
99 |
except Exception as e:
|
|
|
100 |
return Response("Error", status=500)
|
101 |
|
102 |
|