fix: 修复 acfun 番剧订阅和豆瓣商务印书馆新书速递订阅 (#3700)

This commit is contained in:
umm233
2020-01-07 16:40:37 +08:00
committed by DIYgod
parent 0009f573b2
commit a73c2b2b17
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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] || {};
+1 -1
View File
@@ -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,