mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
* feat(route): add 12306火车票消息 and refactor to V2 * fix(route): change guid * fix(route): change to use RSSHub's default UA * fix(route): add handle exception
29 lines
999 B
JavaScript
29 lines
999 B
JavaScript
module.exports = {
|
|
'12306.cn': {
|
|
_name: '12306',
|
|
kyfw: [
|
|
{
|
|
title: '售票信息',
|
|
docs: 'https://docs.rsshub.app/travel.html#_12306-shou-shu-piao-piao-xin-shen-xi',
|
|
source: ['/', '/otn/leftTicket/init'],
|
|
target: (params, url) => {
|
|
const searchParams = new URL(url).searchParams;
|
|
const from = searchParams.get('fs').split(',')[0];
|
|
const to = searchParams.get('ts').split(',')[0];
|
|
const date = searchParams.get('date');
|
|
|
|
return `/12306/${date}/${from}/${to}`;
|
|
},
|
|
},
|
|
],
|
|
www: [
|
|
{
|
|
title: '最新动态',
|
|
docs: 'https://docs.rsshub.app/travel.html#_12306-zui-cuo-xin-dong-tai',
|
|
source: ['/', '/mormhweb/1/:id/index_fl.html'],
|
|
target: '/12306/zxdt/:id',
|
|
},
|
|
],
|
|
},
|
|
};
|