mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route)(douban/wish): username in feed title (#9408)
fix(route)(douban/wish): username in feed title
This commit is contained in:
@@ -13,6 +13,8 @@ module.exports = async (ctx) => {
|
||||
const torrentMinRating = routeParams.torrentMinRating ? parseFloat(routeParams.torrentMinRating) : 0.5;
|
||||
const torrentSkipNoMatch = routeParams.torrentSkipNoMatch === 'true';
|
||||
|
||||
let userName;
|
||||
|
||||
const pageSize = 15;
|
||||
const pagesCount = routeParams.pagesCount ? parseInt(routeParams.pagesCount) : 1;
|
||||
const tasks = [];
|
||||
@@ -31,6 +33,7 @@ module.exports = async (ctx) => {
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('div.article > div.grid-view > div.item');
|
||||
userName = userName || $('div.side-info-txt > h3').text();
|
||||
|
||||
if (list) {
|
||||
return Promise.all(
|
||||
@@ -73,7 +76,7 @@ module.exports = async (ctx) => {
|
||||
items = items.filter((item) => item.enclosure_url && item.enclosure_url.length > 0);
|
||||
}
|
||||
ctx.state.data = {
|
||||
title: `豆瓣想看 - ${userid}`,
|
||||
title: `豆瓣想看 - ${userName || userid}`,
|
||||
link: `https://movie.douban.com/people/${userid}/wish`,
|
||||
item: items,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user