From: Yen Chi Hsuan Date: Wed, 15 Apr 2015 16:27:39 +0000 (+0800) Subject: [brightcove] Always return lists from _extract_brightcove_urls X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=9fc03aa87c74cb199f9e1e146ac5cb71b166d3e7;p=youtube-dl.git [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. --- diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index 117cb00e6..4f60d5366 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -188,7 +188,7 @@ class BrightcoveIE(InfoExtractor): [^>]*?>\s*\s*''', 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): url, smuggled_data = unsmuggle_url(url, {})