From 26901096dab067ac7d015f2f48135bdd8911b123 Mon Sep 17 00:00:00 2001 From: rrooij Date: Sat, 8 Jul 2017 23:13:04 +0200 Subject: [PATCH 1/2] [FiveTV] Add regex for new layout Fixes #13354 --- youtube_dl/extractor/fivetv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/fivetv.py b/youtube_dl/extractor/fivetv.py index 15736c9fe..10a322592 100644 --- a/youtube_dl/extractor/fivetv.py +++ b/youtube_dl/extractor/fivetv.py @@ -70,7 +70,8 @@ class FiveTVIE(InfoExtractor): webpage = self._download_webpage(url, video_id) video_url = self._search_regex( - r']+?href="([^"]+)"[^>]+?class="videoplayer"', + [r']+?class="flowplayer[^>]+?data-href="([^"]+)"', + r']+?href="([^"]+)"[^>]+?class="videoplayer"'], webpage, 'video url') title = self._og_search_title(webpage, default=None) or self._search_regex( From d8071ff89d27a72948f6c067b74aa5cf5b124a8f Mon Sep 17 00:00:00 2001 From: rrooij Date: Sun, 9 Jul 2017 15:13:29 +0200 Subject: [PATCH 2/2] [fivetv] Fix broken test The title changes every episode which caused the test to fail. A regex is now used to handle every episode update. --- youtube_dl/extractor/fivetv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/fivetv.py b/youtube_dl/extractor/fivetv.py index 10a322592..9f9863746 100644 --- a/youtube_dl/extractor/fivetv.py +++ b/youtube_dl/extractor/fivetv.py @@ -43,7 +43,7 @@ class FiveTVIE(InfoExtractor): 'info_dict': { 'id': 'glavnoe', 'ext': 'mp4', - 'title': 'Итоги недели с 8 по 14 июня 2015 года', + 'title': r're:^Итоги недели с \d+ по \d+ \w+ \d{4} года$', 'thumbnail': r're:^https?://.*\.jpg$', }, }, {