0
0
Fork 0

[fox] Fix API error handling under python 2 (closes #20925)

main
Sergey M․ 2019-05-02 00:36:52 +07:00
parent 274519dd08
commit 62d10f0d32
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class FOXIE(AdobePassIE):
'https://api2.fox.com/v2.0/' + path, 'https://api2.fox.com/v2.0/' + path,
video_id, data=data, headers=headers) video_id, data=data, headers=headers)
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:
entitlement_issues = self._parse_json( entitlement_issues = self._parse_json(
e.cause.read().decode(), video_id)['entitlementIssues'] e.cause.read().decode(), video_id)['entitlementIssues']
for e in entitlement_issues: for e in entitlement_issues: