1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 14:57:51 +08:00

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
This commit is contained in:
noniin 2018-02-26 10:31:21 +11:00 committed by GitHub
parent 6ab35f5e16
commit b200d583ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,13 +81,16 @@ class NickIE(MTVServicesInfoExtractor):
class NickBrIE(MTVServicesInfoExtractor):
IE_NAME = 'nickelodeon:br'
_VALID_URL = r'https?://(?P<domain>(?:www\.)?nickjr|mundonick\.uol)\.com\.br/(?:programas/)?[^/]+/videos/(?:episodios/)?(?P<id>[^/?#.]+)'
_VALID_URL = r'https?://(?P<domain>(?:www\.)?(?:nickjr|nickelodeon)|mundonick\.uol)\.com\.(?:br|tr)/(?:(?:programas|programlar)/)?[^/]+/(?:videolar|videos)/(?:episodios/)?(?P<id>[^/?#.]+)'
_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,