From b9c76aa1a9c80013ad4f2f3cd20b98ab1be430ac Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Fri, 11 Apr 2014 13:51:47 +0200 Subject: [PATCH] [youtube] Add support for cleanvideosearch.com (Fixes #2734) --- test/test_all_urls.py | 1 + youtube_dl/extractor/youtube.py | 1 + 2 files changed, 2 insertions(+) diff --git a/test/test_all_urls.py b/test/test_all_urls.py index fb39c5082..d180f23cc 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -49,6 +49,7 @@ class TestAllURLsMatching(unittest.TestCase): self.assertMatch('http://youtu.be/BaW_jenozKc', ['youtube']) self.assertMatch('http://www.youtube.com/v/BaW_jenozKc', ['youtube']) self.assertMatch('https://youtube.googleapis.com/v/BaW_jenozKc', ['youtube']) + self.assertMatch('http://www.cleanvideosearch.com/media/action/yt/watch?videoId=8v_4O44sfjM', ['youtube']) def test_youtube_channel_matching(self): assertChannel = lambda url: self.assertMatch(url, ['youtube:channel']) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 334a61833..ac2d5db4e 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -151,6 +151,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): ) )) |youtu\.be/ # just youtu.be/xxxx + |https?://(?:www\.)?cleanvideosearch\.com/media/action/yt/watch\?videoId= ) )? # all until now is optional -> you can pass the naked ID ([0-9A-Za-z_-]{11}) # here is it! the YouTube video ID -- 2.22.2