From c4c78721de34ea7bfbf69ed9e68cabfd847472ac Mon Sep 17 00:00:00 2001 From: Feilong Ma Date: Mon, 31 Jul 2017 05:26:00 -0400 Subject: [PATCH] Fix parsing irregular episode index --- src/you_get/extractors/bilibili.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/you_get/extractors/bilibili.py b/src/you_get/extractors/bilibili.py index d22b7587..f78c2635 100644 --- a/src/you_get/extractors/bilibili.py +++ b/src/you_get/extractors/bilibili.py @@ -245,7 +245,7 @@ def fetch_sid(cid, aid): def collect_bangumi_epids(json_data): eps = json_data['result']['episodes'] - eps = sorted(eps, key=lambda item: float(item['index'])) + eps = sorted(eps, key=lambda item: float(item['index'].split('-')[0].split('+')[0])) result = [] for ep in eps: result.append(ep['episode_id'])