mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 10:31:29 +00:00
[adn] Improve error reporting (#13663)
This commit is contained in:
parent
7abed4e06c
commit
83d00044c1
|
@ -107,11 +107,13 @@ def _real_extract(self, url):
|
||||||
metas = options.get('metas') or {}
|
metas = options.get('metas') or {}
|
||||||
title = metas.get('title') or video_info['title']
|
title = metas.get('title') or video_info['title']
|
||||||
links = player_config.get('links') or {}
|
links = player_config.get('links') or {}
|
||||||
|
error = None
|
||||||
if not links:
|
if not links:
|
||||||
links_url = player_config['linksurl']
|
links_url = player_config['linksurl']
|
||||||
links_data = self._download_json(urljoin(
|
links_data = self._download_json(urljoin(
|
||||||
self._BASE_URL, links_url), video_id)
|
self._BASE_URL, links_url), video_id)
|
||||||
links = links_data.get('links') or {}
|
links = links_data.get('links') or {}
|
||||||
|
error = links_data.get('error')
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for format_id, qualities in links.items():
|
for format_id, qualities in links.items():
|
||||||
|
@ -130,6 +132,7 @@ def _real_extract(self, url):
|
||||||
for f in m3u8_formats:
|
for f in m3u8_formats:
|
||||||
f['language'] = 'fr'
|
f['language'] = 'fr'
|
||||||
formats.extend(m3u8_formats)
|
formats.extend(m3u8_formats)
|
||||||
|
if not error:
|
||||||
error = options.get('error')
|
error = options.get('error')
|
||||||
if not formats and error:
|
if not formats and error:
|
||||||
raise ExtractorError('%s said: %s' % (self.IE_NAME, error), expected=True)
|
raise ExtractorError('%s said: %s' % (self.IE_NAME, error), expected=True)
|
||||||
|
|
Loading…
Reference in a new issue