mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 09:52:21 +08:00
* add router 关于bilibili票务 * bilibili票务基础模板 * add bilibili会员购票务 maintainer * add cookie * doc文档,radar * add 补充内容 * 修改doc条目顺序,优化代码 * fix:修复doc文旦错误,移除作者备注 * fix: delete radar.js中的多余文字 * fix: 修复错误
This commit is contained in:
@@ -21,6 +21,7 @@ module.exports = {
|
||||
'/online/:disableEmbed?': ['TigerCubDen'],
|
||||
'/partion/:tid/:disableEmbed?': ['DIYgod'],
|
||||
'/partion/ranking/:tid/:days?/:disableEmbed?': ['lengthmin'],
|
||||
'/platform/:area?/:p_type?/:uid?': ['nightmare-mio'],
|
||||
'/popular/all': ['ziminliu'],
|
||||
'/ranking/:rid?/:day?/:arc_type?/:disableEmbed?': ['DIYgod'],
|
||||
'/readlist/:listid': ['hoilc'],
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const config = require('@/config').value;
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { area = -1, type = '全部类型', uid } = ctx.params;
|
||||
const cookie = config.bilibili.cookies[uid];
|
||||
const link = 'https://show.bilibili.com/api/ticket/project/listV2';
|
||||
|
||||
const headers = {
|
||||
Referer: 'https://space.bilibili.com',
|
||||
Cookie: cookie ? `SESSDATA=${cookie}` : undefined,
|
||||
};
|
||||
|
||||
const { data: response } = await got({
|
||||
method: 'get',
|
||||
url: `${link}?version=134&page=1&pagesize=16&area=${area}&filter=&platform=web&p_type=${type}`,
|
||||
headers,
|
||||
});
|
||||
// 列表
|
||||
const list = response.data.result;
|
||||
|
||||
const items = list.map((item) => {
|
||||
const bodyHtml = `<img src="${item.cover}"></img>`;
|
||||
const coordinate = `<div>活动地点: ${item.city} ${item.venue_name}</div>`;
|
||||
const liveTime = `<div>活动时间: ${item.tlabel}</div>`;
|
||||
const staff = `<div>参展览嘉宾: ${item.staff}</div>`;
|
||||
const countdown = `<div>结束日期: ${item.countdown}</div>`;
|
||||
const price = `<div>最低价: ${item.price_low / 100} ; 最高价: ${item.price_high / 100}</div>`;
|
||||
return {
|
||||
title: item.project_name,
|
||||
link: item.url,
|
||||
description: bodyHtml + coordinate + liveTime + staff + countdown + price,
|
||||
pubDate: parseDate(item.sale_start_time * 1000),
|
||||
};
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `bilibili会员购票务-${area}`,
|
||||
link,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -143,5 +143,13 @@ module.exports = {
|
||||
target: '/bilibili/live/room/:roomID',
|
||||
},
|
||||
],
|
||||
show: [
|
||||
{
|
||||
title: '会员购票务',
|
||||
docs: 'https://docs.rsshub.app/routes/social-media#bilibili-hui-yuan-gou-zuo-pin',
|
||||
source: '/platform',
|
||||
target: '/bilibili/platform/:area?/:p_type?/:uid?',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@ module.exports = (router) => {
|
||||
router.get('/online/:disableEmbed?', require('./online'));
|
||||
router.get('/partion/:tid/:disableEmbed?', require('./partion'));
|
||||
router.get('/partion/ranking/:tid/:days?/:disableEmbed?', require('./partion-ranking'));
|
||||
router.get('/platform/:area?/:p_type?/:uid?', require('./platform'));
|
||||
router.get('/popular/all', require('./popular'));
|
||||
router.get('/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', require('./ranking'));
|
||||
router.get('/readlist/:listid', require('./readlist'));
|
||||
|
||||
@@ -341,6 +341,16 @@ UP 主关注用户现在需要 b 站登录后的 Cookie 值,所以只能自建
|
||||
|
||||
<Route author="DIYgod" example="/bilibili/mall/ip/0_3000294" path="/bilibili/mall/ip/:id" paramsDesc={['作品 id, 可在作品列表页 URL 中找到']}/>
|
||||
|
||||
### 会员购票务 {#bilibili-hui-yuan-gou-piao-wu}
|
||||
|
||||
<Route author="nightmare-mio" example="/bilibili/platform/-1/全部类型" path="/bilibili/platform/:area?/:p_type?/:uid?" paramsDesc={['省市-国标码,默认为-1即全国','类型:见下表,默认为全部类型','用户id,可以不填,不过不填不设置cookie,搜索结果与登入账号后搜索结果不一样。可以在url中找到,需要配置cookie值,只需要SESSDATA的值即可']}/>
|
||||
|
||||
| 类型 |
|
||||
| ---- |
|
||||
| 演出 |
|
||||
| 展览 |
|
||||
| 本地生活 |
|
||||
|
||||
### 综合热门 {#bilibili-zong-he-re-men}
|
||||
|
||||
<Route author="ziminliu" example="/bilibili/popular/all" path="/bilibili/popular/all" />
|
||||
|
||||
Reference in New Issue
Block a user