mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 修复 acfun 番剧订阅和豆瓣商务印书馆新书速递订阅 (#3700)
This commit is contained in:
@@ -11,7 +11,7 @@ module.exports = async (ctx) => {
|
||||
Referer: 'http://www.acfun.cn',
|
||||
},
|
||||
});
|
||||
const albumInfo = JSON.parse(bangumiPage.data.match(/window.bangumiData = (.*?);/)[1]) || {};
|
||||
const albumInfo = JSON.parse(bangumiPage.data.match(/window.bangumiData = (.*?);\n/)[1]) || {};
|
||||
const api = `http://www.acfun.cn/album/abm/bangumis/video?albumId=${id}&num=1&size=${albumInfo.itemCount || 9999}`;
|
||||
|
||||
const response = await got({
|
||||
@@ -24,9 +24,9 @@ module.exports = async (ctx) => {
|
||||
const data = response.data.data;
|
||||
|
||||
ctx.state.data = {
|
||||
title: albumInfo.title,
|
||||
title: albumInfo.bangumiTitle,
|
||||
link: url,
|
||||
description: albumInfo.intro,
|
||||
description: albumInfo.bangumiIntro,
|
||||
item: data.content
|
||||
.map((item) => {
|
||||
const video = item.videos[0] || {};
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = async (ctx) => {
|
||||
});
|
||||
|
||||
// 这个有个重定向,需要获取到真实地址后添加排序参数后再请求一次
|
||||
const realUrl = `${newBookLandingPage.request.res.responseUrl}?sort=time&sub_type=`;
|
||||
const realUrl = `${newBookLandingPage.request.gotOptions.href}?sort=time&sub_type=`;
|
||||
const newBookPage = await got({
|
||||
method: 'get',
|
||||
url: realUrl,
|
||||
|
||||
Reference in New Issue
Block a user