mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
fix: 嘀哩嘀哩支持长剧集解析,修复了文档表述不佳的地方 (#2104)
This commit is contained in:
@@ -66,7 +66,11 @@
|
|||||||
|
|
||||||
## 嘀哩嘀哩-dilidili
|
## 嘀哩嘀哩-dilidili
|
||||||
|
|
||||||
<Route name="嘀哩嘀哩番剧更新" author="SunShinenny" path="/dilidili/fanju/:id?" example="/dilidili/fanju/onepunchman2" :paramsDesc="['番剧id,打开对应番剧,从url中最后一位查看']"/>
|
<Route name="嘀哩嘀哩番剧更新" author="SunShinenny" path="/dilidili/fanju/:id" example="/dilidili/fanju/onepunchman2" :paramsDesc="['番剧id']">
|
||||||
|
请打开对应番剧的纵览页(非具体某集),从url中最后一位查看番剧id.(一般为英文)
|
||||||
|
除去超长的番剧(例如海贼)这种具有特殊页面的,绝大多数页面都可以解析.
|
||||||
|
最适合用来追新番
|
||||||
|
</Route>
|
||||||
|
|
||||||
## 動畫瘋
|
## 動畫瘋
|
||||||
|
|
||||||
|
|||||||
0
lib/router.js
Executable file → Normal file
0
lib/router.js
Executable file → Normal file
@@ -44,7 +44,17 @@ module.exports = async (ctx) => {
|
|||||||
const animeName = $('body > div.container.clear > div.clear > div:nth-child(2) > div.detail.con24.clear > dl > dd > h1').text();
|
const animeName = $('body > div.container.clear > div.clear > div:nth-child(2) > div.detail.con24.clear > dl > dd > h1').text();
|
||||||
|
|
||||||
// @param {*} list 用于存储通过 " h4 > a "获取到的节点
|
// @param {*} list 用于存储通过 " h4 > a "获取到的节点
|
||||||
const list = $('body > div.container.clear > div.clear > div:nth-child(2) > div.con24.m-10.xf_news > div.time_pic.list > div:nth-child(1) > div.swiper-container.xfswiper1 > div > div > ul > li > a').get(); // 获取到剧集列表
|
const beforeFilterList = $('div.swiper-container.xfswiper1 > div > div > ul > li > a').get(); // 获取到剧集列表
|
||||||
|
const list = [];
|
||||||
|
beforeFilterList.forEach((element) => {
|
||||||
|
if (
|
||||||
|
$(element)
|
||||||
|
.attr('href')
|
||||||
|
.indexOf('http://') != -1
|
||||||
|
) {
|
||||||
|
list.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 使用promise处理多个节点
|
// 使用promise处理多个节点
|
||||||
const process = await Promise.all(
|
const process = await Promise.all(
|
||||||
// 在list变量上使用map方法,对其拥有的每一个元素均进行"匿名函数"的操作
|
// 在list变量上使用map方法,对其拥有的每一个元素均进行"匿名函数"的操作
|
||||||
|
|||||||
Reference in New Issue
Block a user