mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-28 18:15:19 +02:00
[fox] fix Uplynk PrePlay error handling under python 2(#20925)
This commit is contained in:
parent
62d10f0d32
commit
e0dde1d8e2
@ -100,7 +100,7 @@ def _real_extract(self, url):
|
|||||||
try:
|
try:
|
||||||
m3u8_url = self._download_json(release_url, video_id)['playURL']
|
m3u8_url = self._download_json(release_url, video_id)['playURL']
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
if isinstance(e.cause, compat_HTTPError) and e.cause.status == 403:
|
if isinstance(e.cause, compat_HTTPError) and e.cause.code == 403:
|
||||||
error = self._parse_json(e.cause.read().decode(), video_id)
|
error = self._parse_json(e.cause.read().decode(), video_id)
|
||||||
if error.get('exception') == 'GeoLocationBlocked':
|
if error.get('exception') == 'GeoLocationBlocked':
|
||||||
self.raise_geo_restricted(countries=['US'])
|
self.raise_geo_restricted(countries=['US'])
|
||||||
|
Loading…
Reference in New Issue
Block a user