mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-07 23:35:11 +01:00
[compat, networking] Deprecate old functions (#2861)
Authored by: coletdjnz, pukkandan
This commit is contained in:
parent
227bf1a33b
commit
3d2623a898
176 changed files with 707 additions and 729 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_HTTPError
|
||||
from ..networking.exceptions import HTTPError
|
||||
from ..utils import (
|
||||
float_or_none,
|
||||
parse_iso8601,
|
||||
|
|
@ -31,8 +31,8 @@ class RteBaseIE(InfoExtractor):
|
|||
except ExtractorError as ee:
|
||||
if num < len(ENDPOINTS) or formats:
|
||||
continue
|
||||
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 404:
|
||||
error_info = self._parse_json(ee.cause.read().decode(), item_id, fatal=False)
|
||||
if isinstance(ee.cause, HTTPError) and ee.cause.status == 404:
|
||||
error_info = self._parse_json(ee.cause.response.read().decode(), item_id, fatal=False)
|
||||
if error_info:
|
||||
raise ExtractorError(
|
||||
'%s said: %s' % (self.IE_NAME, error_info['message']),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue