Spaces:
Running
Running
Commit
·
1e62981
1
Parent(s):
333aed4
Update main.py
Browse files
main.py
CHANGED
@@ -18,6 +18,9 @@ app.secret_key = 'green-flounder'
|
|
18 |
with open('video_urls.pkl', 'rb') as f:
|
19 |
live_urls = pkl.load(f)
|
20 |
|
|
|
|
|
|
|
21 |
def load_exception_urls():
|
22 |
url = os.environ['EXCEPTIONS']
|
23 |
response = requests.get(url)
|
@@ -119,6 +122,10 @@ def index():
|
|
119 |
logging.info(f"Generated proxy URL: {proxy_url}")
|
120 |
loc_link = f"https://www.google.com/maps/search/{loc}"
|
121 |
ip_link = url
|
|
|
|
|
|
|
|
|
122 |
return render_template('index.html',
|
123 |
name=name,
|
124 |
url=proxy_url,
|
@@ -130,6 +137,7 @@ def index():
|
|
130 |
ip_link=ip_link,
|
131 |
loc=loc,
|
132 |
loc_link=loc_link,
|
|
|
133 |
X=X,
|
134 |
Y=Y)
|
135 |
|
|
|
18 |
with open('video_urls.pkl', 'rb') as f:
|
19 |
live_urls = pkl.load(f)
|
20 |
|
21 |
+
with open('owner_dict.pkl', 'rb') as f:
|
22 |
+
owner_dict = pkl.load(f)
|
23 |
+
|
24 |
def load_exception_urls():
|
25 |
url = os.environ['EXCEPTIONS']
|
26 |
response = requests.get(url)
|
|
|
122 |
logging.info(f"Generated proxy URL: {proxy_url}")
|
123 |
loc_link = f"https://www.google.com/maps/search/{loc}"
|
124 |
ip_link = url
|
125 |
+
try:
|
126 |
+
owner = owner_dict[ip]
|
127 |
+
except:
|
128 |
+
owner = 'unknown'
|
129 |
return render_template('index.html',
|
130 |
name=name,
|
131 |
url=proxy_url,
|
|
|
137 |
ip_link=ip_link,
|
138 |
loc=loc,
|
139 |
loc_link=loc_link,
|
140 |
+
owner=owner,
|
141 |
X=X,
|
142 |
Y=Y)
|
143 |
|