From b948314d50ba2c3207b72a1b5a13dd0f092daf9d Mon Sep 17 00:00:00 2001 From: NeroBurner-tux Date: Thu, 1 Nov 2018 20:03:19 +0100 Subject: [PATCH] atv.at: fix initial video extraction ATV.at did change the HTML structure. They moved the json data into a variable. Now the extractor looks for the variable instead Also keep the old regex --- youtube_dl/extractor/atvat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/atvat.py b/youtube_dl/extractor/atvat.py index 1584d53fc37..e429f76e83b 100644 --- a/youtube_dl/extractor/atvat.py +++ b/youtube_dl/extractor/atvat.py @@ -28,8 +28,10 @@ def _real_extract(self, url): display_id = self._match_id(url) webpage = self._download_webpage(url, display_id) video_data = self._parse_json(unescapeHTML(self._search_regex( - r'class="[^"]*jsb_video/FlashPlayer[^"]*"[^>]+data-jsb="([^"]+)"', - webpage, 'player data')), display_id)['config']['initial_video'] + [ + r'var\s+flashPlayerOptions\s*=\s*"([^"]+)"', + r'class="[^"]*jsb_video/FlashPlayer[^"]*"[^>]+data-jsb="([^"]+)"', + ], webpage, 'player data')), display_id)['config']['initial_video'] video_id = video_data['id'] video_title = video_data['title']