diff options
author | Sergey M․ <[email protected]> | 2016-02-18 21:50:21 +0600 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2016-02-18 21:50:21 +0600 |
commit | bc7a9cd8fb223481593840441d20c0f19f93c4c8 (patch) | |
tree | 981860c974e3eb3e117efa6cd15bfd3cbaecc651 | |
parent | d48502b82a3466dc3f75dc35815bfe22a934aabf (diff) | |
download | youtube-dl-bc7a9cd8fb223481593840441d20c0f19f93c4c8.tar.gz youtube-dl-bc7a9cd8fb223481593840441d20c0f19f93c4c8.zip |
[youtube:watchlater] Improve _VALID_URL (Closes #8594)
-rw-r--r-- | youtube_dl/extractor/youtube.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 45ad88152..408c8d52c 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2026,9 +2026,15 @@ class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor): class YoutubeWatchLaterIE(YoutubePlaylistIE): IE_NAME = 'youtube:watchlater' IE_DESC = 'Youtube watch later list, ":ytwatchlater" for short (requires authentication)' - _VALID_URL = r'https?://www\.youtube\.com/(?:feed/watch_later|playlist\?list=WL)|:ytwatchlater' + _VALID_URL = r'https?://www\.youtube\.com/(?:feed/watch_later|(?:playlist|watch)\?(?:.+&)?list=WL)|:ytwatchlater' - _TESTS = [] # override PlaylistIE tests + _TESTS = [{ + 'url': 'https://www.youtube.com/playlist?list=WL', + 'only_matching': True, + }, { + 'url': 'https://www.youtube.com/watch?v=bCNU9TrbiRk&index=1&list=WL', + 'only_matching': True, + }] def _real_extract(self, url): return self._extract_playlist('WL') |