From b200d583caa5a2bf44c34148f86eaa170c03d63b Mon Sep 17 00:00:00 2001 From: noniin <36477155+noniin@users.noreply.github.com> Date: Mon, 26 Feb 2018 10:31:21 +1100 Subject: [PATCH] Add nickelodeon.com.tr support The format is similar to com.br, therefore a simple regex change brings com.tr support. The downloaded videos' black border can be removed with ffmpeg, see; https://superuser.com/q/772795 --- youtube_dl/extractor/nick.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/nick.py b/youtube_dl/extractor/nick.py index 7edd68472..6f3522ff4 100644 --- a/youtube_dl/extractor/nick.py +++ b/youtube_dl/extractor/nick.py @@ -81,13 +81,16 @@ class NickIE(MTVServicesInfoExtractor): class NickBrIE(MTVServicesInfoExtractor): IE_NAME = 'nickelodeon:br' - _VALID_URL = r'https?://(?P(?:www\.)?nickjr|mundonick\.uol)\.com\.br/(?:programas/)?[^/]+/videos/(?:episodios/)?(?P[^/?#.]+)' + _VALID_URL = r'https?://(?P(?:www\.)?(?:nickjr|nickelodeon)|mundonick\.uol)\.com\.(?:br|tr)/(?:(?:programas|programlar)/)?[^/]+/(?:videolar|videos)/(?:episodios/)?(?P[^/?#.]+)' _TESTS = [{ 'url': 'http://www.nickjr.com.br/patrulha-canina/videos/210-labirinto-de-pipoca/', 'only_matching': True, }, { 'url': 'http://mundonick.uol.com.br/programas/the-loud-house/videos/muitas-irmas/7ljo9j', 'only_matching': True, + }, { + 'url': 'http://www.nickelodeon.com.tr/programlar/sunger-bob/videolar/kayip-yatak/mgqbjy', + 'only_matching': True, }] def _real_extract(self, url): @@ -111,6 +114,7 @@ class NickBrIE(MTVServicesInfoExtractor): content_domain = { 'mundonick.uol': 'mundonick.com.br', 'nickjr': 'br.nickelodeonjunior.tv', + 'nickelodeon': 'nickelodeon.com.tr' }[domain] query = { 'mgid': uri,