forked from rDrama/rDrama
AAAAAAAAAAAAA
parent
3e7e2769c4
commit
6b04686a6b
|
@ -440,7 +440,10 @@ if SITE == 'watchpeopledie.tv':
|
||||||
def geoblock():
|
def geoblock():
|
||||||
ip = request.headers.get("X-Forwarded-For")
|
ip = request.headers.get("X-Forwarded-For")
|
||||||
req = requests.get(f'http://ipinfo.io/{ip}/json')
|
req = requests.get(f'http://ipinfo.io/{ip}/json')
|
||||||
country = json.loads(req.text)['country']
|
try:
|
||||||
if country == 'AU':
|
country = json.loads(req.text)['country']
|
||||||
abort(403, "This video is blocked in Australia.")
|
if country == 'AU':
|
||||||
|
abort(403, "This video is blocked in Australia.")
|
||||||
|
except:
|
||||||
|
print(req.text, flush=True)
|
||||||
return send_file('/videos/1706708037797343.mp4')
|
return send_file('/videos/1706708037797343.mp4')
|
||||||
|
|
Loading…
Reference in New Issue