A feature-rich command-line audio/video downloader
[ard] Skip invalid stream URLs (closes #14906)
Sergey M․91328f26b050
diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.pyindex 915f8862e3..ef73d5a933 100644--- a/youtube_dl/extractor/ard.py+++ b/youtube_dl/extractor/ard.py@@ -5,6 +5,7 @@ import refrom .common import InfoExtractorfrom .generic import GenericIE+from ..compat import compat_strfrom ..utils import (determine_ext,ExtractorError,@@ -126,6 +127,8 @@ class ARDMediathekIE(InfoExtractor):quality = stream.get('_quality')server = stream.get('_server')for stream_url in stream_urls:+ if not isinstance(stream_url, compat_str) or '//' not in stream_url:+ continueext = determine_ext(stream_url)if quality != 'auto' and ext in ('f4m', 'm3u8'):continue@@ -146,13 +149,11 @@ class ARDMediathekIE(InfoExtractor):'play_path': stream_url,'format_id': 'a%s-rtmp-%s' % (num, quality),}- elif stream_url.startswith('http'):+ else:f = {'url': stream_url,'format_id': 'a%s-%s-%s' % (num, ext, quality)}- else:- continuem = re.search(r'_(?P<width>\d+)x(?P<height>\d+)\.mp4$', stream_url)if m:f.update({