1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

[brightcove] Always return lists from _extract_brightcove_urls

In Python 3, filter() returns an iterable object, which is equivalently
to True even for an empty result set. It causes false positive playlists
in generic extraction logic.
This commit is contained in:
Yen Chi Hsuan 2015-04-16 00:27:39 +08:00
parent c798f15b98
commit 9fc03aa87c

View File

@ -188,7 +188,7 @@ class BrightcoveIE(InfoExtractor):
[^>]*?>\s*<param\s+name="movie"\s+value="https?://[^/]*brightcove\.com/ [^>]*?>\s*<param\s+name="movie"\s+value="https?://[^/]*brightcove\.com/
).+?>\s*</object>''', ).+?>\s*</object>''',
webpage) webpage)
return filter(None, [cls._build_brighcove_url(m) for m in matches]) return list(filter(None, [cls._build_brighcove_url(m) for m in matches]))
def _real_extract(self, url): def _real_extract(self, url):
url, smuggled_data = unsmuggle_url(url, {}) url, smuggled_data = unsmuggle_url(url, {})