Compare commits

..

No commits in common. "ad16c982f42ec00de621530eeede3ba4dbbd126a" and "44452fe850f78fd6092d68e8e16a91d5715dc651" have entirely different histories.

View File

@ -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}')
edges.setdefault(edge_id, {}).update(
traverse_obj(division_data, ('data', 'story_list', lambda _, v: v['edge_id'] == 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, {
'title': ('title', {str}),
'cid': ('cid', {int_or_none}),
}), get_all=False))
}))
edges[edge_id].update(traverse_obj(division_data, ('data', {
'title': ('title', {str}),
@ -855,9 +855,6 @@ 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)},
@ -951,7 +948,11 @@ 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)
yield {
**self._extract_episode(season_info, ep_id),
'extractor_key': BilibiliCheeseIE.ie_key(),
'extractor': BilibiliCheeseIE.IE_NAME,
}
def _real_extract(self, url):
season_id = self._match_id(url)