feat: 修改豆瓣标题和参数描述 (#4315)
This commit is contained in:
parent
9587c74d24
commit
ae200a567d
|
|
@ -522,7 +522,7 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性
|
|||
|
||||
### 豆瓣电影人
|
||||
|
||||
<Route author="minimalistrojan" example="/douban/celebrity/1274261" path="/douban/celebrity/:id/:sort?" :paramsDesc="['电影人 id', '排序方式,缺省为 `time` (时间排序),可为 `vote` (评价排序)']"/>
|
||||
<Route author="minimalistrojan" example="/douban/celebrity/1274261" path="/douban/celebrity/:id/:sort?" :paramsDesc="['电影人 id', '排序方式,缺省为 `time`(时间排序),可为 `vote` (评价排序)']"/>
|
||||
|
||||
### 豆瓣小组
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,14 @@ module.exports = async (ctx) => {
|
|||
|
||||
const $ = cheerio.load(data); // 使用 cheerio 加载返回的 HTML
|
||||
const list = $('div.grid_view > ul li'); // 使用 cheerio 选择器
|
||||
|
||||
const person = $('#content > h1')
|
||||
.text()
|
||||
.replace(/的全部作品(\d{1,})/, '');
|
||||
let itemPicUrl;
|
||||
|
||||
ctx.state.data = {
|
||||
title: '豆瓣电影-电影人作品',
|
||||
title: `豆瓣电影人 - ${person}`,
|
||||
link: `https://movie.douban.com/celebrity/${id}/movies?sortby=${sort}`,
|
||||
item:
|
||||
list &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue