forked from rDrama/rDrama
1
0
Fork 0
master
Aevann 2024-02-01 22:13:52 +02:00
parent dc26096194
commit 4e9a5cd3e5
1 changed files with 5 additions and 3 deletions

View File

@ -440,8 +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']
country = json.loads(req.text)
print(country, flush=True)
if country == 'AU':
abort(403, "This video is blocked in Australia.")
# ['country']
# print(country, flush=True)
# if country == 'AU':
# abort(403, "This video is blocked in Australia.")
return send_file('/videos/1706708037797343.mp4')