aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-02-11 17:58:48 +0100
committerremitamine <remitamine@gmail.com>2016-02-11 17:58:48 +0100
commit81e1c4e2fc260c77de8afabc73090b549d6ba259 (patch)
treeaeaf3ffdd2251c8724f766f9674965c5116bd8d2 /youtube_dl
parent388ae76b52ff85dba5c47f5958fbe3e662abd346 (diff)
[extractor/common] remove duplicate rtmp formats in smil manifest
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/common.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 00645feed..6b40a8323 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1186,12 +1186,13 @@ class InfoExtractor(object):
http_count = 0
m3u8_count = 0
- src_urls = []
+ srcs = []
videos = smil.findall(self._xpath_ns('.//video', namespace))
for video in videos:
src = video.get('src')
- if not src:
+ if not src or src in srcs:
continue
+ srcs.append(src)
bitrate = float_or_none(video.get('system-bitrate') or video.get('systemBitrate'), 1000)
filesize = int_or_none(video.get('size') or video.get('fileSize'))
@@ -1223,9 +1224,6 @@ class InfoExtractor(object):
continue
src_url = src if src.startswith('http') else compat_urlparse.urljoin(base, src)
- if src_url in src_urls:
- continue
- src_urls.append(src_url)
if proto == 'm3u8' or src_ext == 'm3u8':
m3u8_formats = self._extract_m3u8_formats(