AAAAAAAAAAAAA

pull/222/head
Aevann 2024-02-01 22:42:18 +02:00
parent 3e7e2769c4
commit 6b04686a6b
1 changed files with 6 additions and 3 deletions

View File

@ -440,7 +440,10 @@ if SITE == 'watchpeopledie.tv':
def geoblock():
ip = request.headers.get("X-Forwarded-For")
req = requests.get(f'http://ipinfo.io/{ip}/json')
country = json.loads(req.text)['country']
if country == 'AU':
abort(403, "This video is blocked in Australia.")
try:
country = json.loads(req.text)['country']
if country == 'AU':
abort(403, "This video is blocked in Australia.")
except:
print(req.text, flush=True)
return send_file('/videos/1706708037797343.mp4')