projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ac73fc
)
[zattoo] Fix extraction (closes #17175)
author
Alexander Seiler
<seileralex@gmail.com>
Sun, 23 Sep 2018 14:34:47 +0000
(16:34 +0200)
committer
Sergey M
<dstftw@gmail.com>
Sun, 23 Sep 2018 14:34:47 +0000
(21:34 +0700)
youtube_dl/extractor/zattoo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/zattoo.py
b/youtube_dl/extractor/zattoo.py
index fb167c1985527ada9d06e5f482e20c88ba0a4559..9c9024799ad63112487dc5147a3bacba106037c7 100644
(file)
--- 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(
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={
video_id,
'Downloading video information',
query={
- 'program_id': video_id,
- 'complete': True
+ 'program_id
s
': video_id,
+ 'complete': True
,
})
})
- p = data['program
'
]
+ p = data['program
s'][0
]
cid = p['cid']
info_dict = {
'id': video_id,
cid = p['cid']
info_dict = {
'id': video_id,
- 'title': p.get('t
itle') or p['episode_title
'],
- 'description': p.get('d
escription
'),
- 'thumbnail': p.get('i
mage
_url'),
+ 'title': p.get('t
') or p['et
'],
+ 'description': p.get('d'),
+ 'thumbnail': p.get('i_url'),
'creator': p.get('channel_name'),
'creator': p.get('channel_name'),
- 'episode': p.get('e
pisode_title
'),
- 'episode_number': int_or_none(p.get('e
pisode_number
')),
- 'season_number': int_or_none(p.get('s
eason_number
')),
+ 'episode': p.get('e
t
'),
+ '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')),
'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
}
return cid, info_dict