aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/zattoo.py
diff options
context:
space:
mode:
authorAlexander Seiler <seileralex@gmail.com>2018-09-23 16:34:47 +0200
committerSergey M <dstftw@gmail.com>2018-09-23 21:34:47 +0700
commit21160a179256cfbb859948138905ffe67cb970a8 (patch)
tree556aa02ee2ef2674c78640e2ba70bac9527521f2 /youtube_dl/extractor/zattoo.py
parent4ac73fc170f41ccb2d468a0b8563b2ec39d9e9b9 (diff)
[zattoo] Fix extraction (closes #17175)
Diffstat (limited to 'youtube_dl/extractor/zattoo.py')
-rw-r--r--youtube_dl/extractor/zattoo.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/youtube_dl/extractor/zattoo.py b/youtube_dl/extractor/zattoo.py
index fb167c198..9c9024799 100644
--- a/youtube_dl/extractor/zattoo.py
+++ b/youtube_dl/extractor/zattoo.py
@@ -93,28 +93,30 @@ class ZattooBaseIE(InfoExtractor):
def _extract_cid_and_video_info(self, video_id):
data = self._download_json(
- '%s/zapi/program/details' % self._HOST_URL,
+ '%s/zapi/v2/cached/program/power_details/%s' % (
+ self._HOST_URL, self._power_guide_hash),
video_id,
'Downloading video information',
query={
- 'program_id': video_id,
- 'complete': True
+ 'program_ids': video_id,
+ 'complete': True,
})
- p = data['program']
+ p = data['programs'][0]
cid = p['cid']
info_dict = {
'id': video_id,
- 'title': p.get('title') or p['episode_title'],
- 'description': p.get('description'),
- 'thumbnail': p.get('image_url'),
+ 'title': p.get('t') or p['et'],
+ 'description': p.get('d'),
+ 'thumbnail': p.get('i_url'),
'creator': p.get('channel_name'),
- 'episode': p.get('episode_title'),
- 'episode_number': int_or_none(p.get('episode_number')),
- 'season_number': int_or_none(p.get('season_number')),
+ 'episode': p.get('et'),
+ 'episode_number': int_or_none(p.get('e_no')),
+ 'season_number': int_or_none(p.get('s_no')),
'release_year': int_or_none(p.get('year')),
- 'categories': try_get(p, lambda x: x['categories'], list),
+ 'categories': try_get(p, lambda x: x['c'], list),
+ 'tags': try_get(p, lambda x: x['g'], list)
}
return cid, info_dict