diff options
author | Sergey M․ <[email protected]> | 2019-05-02 00:36:52 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2019-05-02 00:36:52 +0700 |
commit | 62d10f0d325cf925855f5720163799298fe688dc (patch) | |
tree | 63edac5b728d1f327992a4b3798447c0e2bf3e1f | |
parent | 274519dd08a312e3677c5bc9dd81bec743571261 (diff) | |
download | youtube-dl-62d10f0d325cf925855f5720163799298fe688dc.tar.gz youtube-dl-62d10f0d325cf925855f5720163799298fe688dc.zip |
[fox] Fix API error handling under python 2 (closes #20925)
-rw-r--r-- | youtube_dl/extractor/fox.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/fox.py b/youtube_dl/extractor/fox.py index f30d3cba8..f1fbaa0fc 100644 --- a/youtube_dl/extractor/fox.py +++ b/youtube_dl/extractor/fox.py @@ -66,7 +66,7 @@ class FOXIE(AdobePassIE): 'https://api2.fox.com/v2.0/' + path, video_id, data=data, headers=headers) 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: entitlement_issues = self._parse_json( e.cause.read().decode(), video_id)['entitlementIssues'] for e in entitlement_issues: |