projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61d18c8
)
[ard] Skip invalid stream URLs (closes #14906)
author
Sergey M․
<dstftw@gmail.com>
Tue, 5 Dec 2017 16:01:57 +0000
(23:01 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 5 Dec 2017 16:01:57 +0000
(23:01 +0700)
youtube_dl/extractor/ard.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ard.py
b/youtube_dl/extractor/ard.py
index 915f8862e3769c3f186209435dcc34029dead932..ef73d5a933f2ae08bfff028f0bd58afc0433ce54 100644
(file)
--- a/
youtube_dl/extractor/ard.py
+++ b/
youtube_dl/extractor/ard.py
@@
-5,6
+5,7
@@
import re
from .common import InfoExtractor
from .generic import GenericIE
from .common import InfoExtractor
from .generic import GenericIE
+from ..compat import compat_str
from ..utils import (
determine_ext,
ExtractorError,
from ..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:
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:
+ continue
ext = determine_ext(stream_url)
if quality != 'auto' and ext in ('f4m', 'm3u8'):
continue
ext = 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),
}
'play_path': stream_url,
'format_id': 'a%s-rtmp-%s' % (num, quality),
}
- el
if stream_url.startswith('http')
:
+ el
se
:
f = {
'url': stream_url,
'format_id': 'a%s-%s-%s' % (num, ext, quality)
}
f = {
'url': stream_url,
'format_id': 'a%s-%s-%s' % (num, ext, quality)
}
- else:
- continue
m = re.search(r'_(?P<width>\d+)x(?P<height>\d+)\.mp4$', stream_url)
if m:
f.update({
m = re.search(r'_(?P<width>\d+)x(?P<height>\d+)\.mp4$', stream_url)
if m:
f.update({