From 5140730235343cc077b717bf5f13f79120795a62 Mon Sep 17 00:00:00 2001 From: Moritz Heinemann Date: Thu, 1 Mar 2018 14:54:10 +0100 Subject: [PATCH] [prosiebensat1] fix playlist extraction --- youtube_dl/extractor/prosiebensat1.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/prosiebensat1.py b/youtube_dl/extractor/prosiebensat1.py index 7efff4566..dbd7dd11d 100644 --- a/youtube_dl/extractor/prosiebensat1.py +++ b/youtube_dl/extractor/prosiebensat1.py @@ -374,10 +374,11 @@ class ProSiebenSat1IE(ProSiebenSat1BaseIE): r'(\d{2}\.\d{2}\.\d{4}) \| \d{2}:\d{2} Min
', ] _PAGE_TYPE_REGEXES = [ - r'', + r'', r"'itemType'\s*:\s*'([^']*)'", ] _PLAYLIST_ID_REGEXES = [ + r'', r'content[iI]d=(\d+)', r"'itemId'\s*:\s*'([^']*)'", ] @@ -414,11 +415,12 @@ class ProSiebenSat1IE(ProSiebenSat1BaseIE): self._PLAYLIST_ID_REGEXES, webpage, 'playlist id') playlist = self._parse_json( self._search_regex( - r'var\s+contentResources\s*=\s*(\[.+?\]);\s*(.+?)', webpage, 'playlist'), - playlist_id) + playlist_id).get('page').get('clips') entries = [] - for item in playlist: + for playlist_item in playlist: + item = self._parse_json(playlist_item.get('contentResource'), playlist_id)[0] clip_id = item.get('id') or item.get('upc') if not clip_id: continue