def test_get_list(): season_id = "28770" video_list = get_bangumi_list(season_id=season_id, with_section=False) assert video_list[0]["cid"] == "144541892" assert video_list[0]["avid"] == "84271171" assert video_list[0]["bvid"] == "BV1q7411v7Vd" assert video_list[0]["episode_id"] == "300998"
def get_list(resource_id): video_list = get_bangumi_list(season_id=resource_id.season_id, episode_id=resource_id.episode_id) return [ { "id": video["id"], "name": video["name"], # fmt: off "meta": { "avid": video["avid"], "bvid": video["bvid"], "cid": video["cid"], "episode_id": video["episode_id"] }, } for video in video_list ]