Skip to content

Commit

Permalink
atv.at: fix initial video extraction
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NeroBurner committed Nov 5, 2018
1 parent c70ba66 commit b948314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions youtube_dl/extractor/atvat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit b948314

Please sign in to comment.