]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[fox] fix Uplynk PrePlay error handling under python 2(#20925)
authorRemita Amine <remitamine@gmail.com>
Thu, 2 May 2019 09:46:29 +0000 (10:46 +0100)
committerRemita Amine <remitamine@gmail.com>
Thu, 2 May 2019 09:46:29 +0000 (10:46 +0100)
youtube_dl/extractor/fox.py

index f1fbaa0fcd20fa967f5f3db67cd2d422a53583d2..04f4bdba6a4872260f12dc25a4c464c41f7fa266 100644 (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'])