From 4e04cbf35e8e48ff15e8e7996e7fa7d95295e827 Mon Sep 17 00:00:00 2001 From: eleph-hub <59421919+eleph-hub@users.noreply.github.com> Date: Tue, 25 Feb 2020 20:59:01 +0100 Subject: [PATCH 1/3] fixed ServusTV support is broken #23475 added proposed fix from PR23583 and added a test for the new URL pattern. --- youtube_dl/extractor/servus.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/servus.py b/youtube_dl/extractor/servus.py index e579d42cf..7575a15b8 100644 --- a/youtube_dl/extractor/servus.py +++ b/youtube_dl/extractor/servus.py @@ -7,7 +7,7 @@ from .common import InfoExtractor class ServusIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?servus\.com/(?:(?:at|de)/p/[^/]+|tv/videos)/(?P[aA]{2}-\w+|\d+-\d+)' + _VALID_URL = r'https?://(?:www\.)?servus(tv)?\.com/(?:(?:at|de)/p/[^/]+|videos)/(?P[aA]{2}-\w+|\d+-\d+)' _TESTS = [{ 'url': 'https://www.servus.com/de/p/Die-Gr%C3%BCnen-aus-Sicht-des-Volkes/AA-1T6VBU5PW1W12/', 'md5': '3e1dd16775aa8d5cbef23628cfffc1f4', @@ -27,7 +27,10 @@ class ServusIE(InfoExtractor): }, { 'url': 'https://www.servus.com/tv/videos/1380889096408-1235196658/', 'only_matching': True, - }] + }, { + 'url': 'https://www.servustv.com/videos/aa-21bma4d4d1w12/', + 'only_matching': True, + }] def _real_extract(self, url): video_id = self._match_id(url).upper() From 8a28ae7108b776bf87104e08dd21dca879ead6ad Mon Sep 17 00:00:00 2001 From: eleph-hub <59421919+eleph-hub@users.noreply.github.com> Date: Tue, 25 Feb 2020 21:27:01 +0100 Subject: [PATCH 2/3] fix for url pattern fixed pattern https://www.servus.com/tv/videos/aa-1t6vbu5pw1w12/ --- youtube_dl/extractor/servus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/servus.py b/youtube_dl/extractor/servus.py index 7575a15b8..5df277736 100644 --- a/youtube_dl/extractor/servus.py +++ b/youtube_dl/extractor/servus.py @@ -7,7 +7,7 @@ from .common import InfoExtractor class ServusIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?servus(tv)?\.com/(?:(?:at|de)/p/[^/]+|videos)/(?P[aA]{2}-\w+|\d+-\d+)' + _VALID_URL = r'https?://(?:www\.)?servus(tv)?\.com/(?:(?:at|de)/p/[^/]+|(tv/)?videos)/(?P[aA]{2}-\w+|\d+-\d+)' _TESTS = [{ 'url': 'https://www.servus.com/de/p/Die-Gr%C3%BCnen-aus-Sicht-des-Volkes/AA-1T6VBU5PW1W12/', 'md5': '3e1dd16775aa8d5cbef23628cfffc1f4', From f04954f46e036931c38299c4af4a63cbbefdc472 Mon Sep 17 00:00:00 2001 From: eleph-hub <59421919+eleph-hub@users.noreply.github.com> Date: Thu, 27 Feb 2020 20:39:55 +0100 Subject: [PATCH 3/3] fixed flake8 findings sorry. --- youtube_dl/extractor/servus.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/servus.py b/youtube_dl/extractor/servus.py index 5df277736..c4e274284 100644 --- a/youtube_dl/extractor/servus.py +++ b/youtube_dl/extractor/servus.py @@ -28,9 +28,9 @@ class ServusIE(InfoExtractor): 'url': 'https://www.servus.com/tv/videos/1380889096408-1235196658/', 'only_matching': True, }, { - 'url': 'https://www.servustv.com/videos/aa-21bma4d4d1w12/', - 'only_matching': True, - }] + 'url': 'https://www.servustv.com/videos/aa-21bma4d4d1w12/', + 'only_matching': True, + }] def _real_extract(self, url): video_id = self._match_id(url).upper()