mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-15 06:00:52 +00:00
[fox] Fix API error handling under python 2 (closes #20925)
This commit is contained in:
parent
274519dd08
commit
62d10f0d32
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user