Browse Source

[fox] fix Uplynk PrePlay error handling under python 2(#20925)

master
Remita Amine 5 years ago
parent
commit
e0dde1d8e2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/extractor/fox.py

+ 1
- 1
youtube_dl/extractor/fox.py View File

@ -100,7 +100,7 @@ class FOXIE(AdobePassIE):
try:
m3u8_url = self._download_json(release_url, video_id)['playURL']
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)
if error.get('exception') == 'GeoLocationBlocked':
self.raise_geo_restricted(countries=['US'])


Loading…
Cancel
Save