mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-19 13:52:36 +00:00
[ie/soundcloud] Improve error handling (#16602)
Closes #16603 Authored by: bashonly
This commit is contained in:
parent
165ee77a2b
commit
ebf0c0f61e
@ -321,9 +321,16 @@ class SoundcloudBaseIE(InfoExtractor):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# XXX: if not extract_flat, 429 error must be caught where _extract_info_dict is called
|
# XXX: if not extract_flat, 429 error must be caught where _extract_info_dict is called
|
||||||
|
try:
|
||||||
stream_url = traverse_obj(self._call_api(
|
stream_url = traverse_obj(self._call_api(
|
||||||
format_url, track_id, f'Downloading {short_identifier} format info JSON',
|
format_url, track_id, f'Downloading {short_identifier} format info JSON',
|
||||||
query=query, headers=self._HEADERS), ('url', {url_or_none}))
|
query=query, headers=self._HEADERS), ('url', {url_or_none}))
|
||||||
|
except ExtractorError as e:
|
||||||
|
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
|
||||||
|
self.report_warning(f'{short_identifier} format not found', video_id=track_id)
|
||||||
|
continue
|
||||||
|
raise
|
||||||
|
|
||||||
if invalid_url(stream_url):
|
if invalid_url(stream_url):
|
||||||
continue
|
continue
|
||||||
format_urls.add(stream_url)
|
format_urls.add(stream_url)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user