feat: 专栏里的动态链接识别优化 (#283)

Fixed #283
This commit is contained in:
shanmite 2023-05-05 10:20:17 +08:00
parent fd2921cb07
commit 67313f4a23

View File

@ -426,7 +426,7 @@ class Searcher {
}
const
content = await bili.getOneArticleByCv(id),
dyids = content.match(/(?<=t.bilibili.com\/)[0-9]+/g) || [],
dyids = content.match(/[0-9]{18}/g) || [],
short_ids = content.match(/(?<=b23.tv\/)[a-zA-Z0-9]{7}/g) || [],
short_id_set = [...new Set(short_ids)],
short_ids_to_dyids = await Promise.all(short_id_set.map(bili.shortDynamicIdToDyid)),