commit 1b39e948fbe01a130ce0c3c7dbcf2cf1840ae4b2
parent 8106dc7cd5770181cdf92ffa00850da2dceaa4bc
Author: Fai <4016742+aicest@users.noreply.github.com>
Date:   Tue,  3 Nov 2020 12:26:13 +0800

[xiami] raise expressive error thrown by vendor (#24)

Avoid confusing error message.
Diffstat:
Myoutube_dl/extractor/xiami.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/xiami.py b/youtube_dl/extractor/xiami.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote -from ..utils import int_or_none +from ..utils import int_or_none, ExtractorError class XiamiBaseIE(InfoExtractor): @@ -46,6 +46,8 @@ class XiamiBaseIE(InfoExtractor): item_id, headers={ 'Referer': referer, }) + if 'message' in playlist and playlist['message']: + raise ExtractorError(playlist['message'], expected=True) return [ self._extract_track(track, item_id) for track in playlist['data']['trackList']]