mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 00:11:26 +01:00
Compare commits
3 Commits
44452fe850
...
ad16c982f4
Author | SHA1 | Date | |
---|---|---|---|
|
ad16c982f4 | ||
|
dbbab38a39 | ||
|
5bf01789a7 |
|
@ -179,11 +179,11 @@ class BilibiliBaseIE(InfoExtractor):
|
|||
'https://api.bilibili.com/x/stein/edgeinfo_v2', video_id,
|
||||
query={'graph_version': graph_version, 'edge_id': edge_id, 'bvid': video_id},
|
||||
note=f'Extracting divisions from edge {edge_id}')
|
||||
for node in traverse_obj(division_data, ('data', 'story_list', lambda _, v: v['edge_id'] == edge_id)):
|
||||
edges.setdefault(node['edge_id'], {}).update(traverse_obj(node, {
|
||||
edges.setdefault(edge_id, {}).update(
|
||||
traverse_obj(division_data, ('data', 'story_list', lambda _, v: v['edge_id'] == edge_id, {
|
||||
'title': ('title', {str}),
|
||||
'cid': ('cid', {int_or_none}),
|
||||
}))
|
||||
}), get_all=False))
|
||||
|
||||
edges[edge_id].update(traverse_obj(division_data, ('data', {
|
||||
'title': ('title', {str}),
|
||||
|
@ -855,6 +855,9 @@ class BilibiliCheeseBaseIE(BilibiliBaseIE):
|
|||
'id': str_or_none(ep_id),
|
||||
'episode_id': str_or_none(ep_id),
|
||||
'formats': self.extract_formats(play_info),
|
||||
'extractor_key': BilibiliCheeseIE.ie_key(),
|
||||
'extractor': BilibiliCheeseIE.IE_NAME,
|
||||
'webpage_url': f'https://www.bilibili.com/cheese/play/ep{ep_id}',
|
||||
**traverse_obj(episode_info, {
|
||||
'episode': ('title', {str}),
|
||||
'title': {lambda v: v and join_nonempty('index', 'title', delim=' - ', from_dict=v)},
|
||||
|
@ -948,11 +951,7 @@ class BilibiliCheeseSeasonIE(BilibiliCheeseBaseIE):
|
|||
|
||||
def _get_cheese_entries(self, season_info):
|
||||
for ep_id in traverse_obj(season_info, ('episodes', lambda _, v: v['episode_can_view'], 'id')):
|
||||
yield {
|
||||
**self._extract_episode(season_info, ep_id),
|
||||
'extractor_key': BilibiliCheeseIE.ie_key(),
|
||||
'extractor': BilibiliCheeseIE.IE_NAME,
|
||||
}
|
||||
yield self._extract_episode(season_info, ep_id)
|
||||
|
||||
def _real_extract(self, url):
|
||||
season_id = self._match_id(url)
|
||||
|
|
Loading…
Reference in New Issue
Block a user