* fix(route): 修复 米游社 公告栏 template 错误 * feat(route): 新增 bing 搜索 * docs: Update other.mdx * docs: fix docs * feat(route): 新增 百度搜索 * fix(route): 修复 pubDate 解析错误 * fix(route): 优化 百度搜索的缓存,减轻反爬问题 * feat(route): 新增 360 搜索 * feat(route): 迁移 搜狗特色LOGO 到 v2 规范;添加 搜狗搜索 * fix(route): 百度搜索增加图片 * feat(route): 新增 Google Search * fix(route): 修复 百度搜索相关问题 * fix(route): 修复 Google 相关问题 * fix(route): 修复 360 搜索 * fix(route): 修复 搜狗搜索 * fix(route): 修复 await 问题 * fix: 移除 google sites * fix(route): 修复 缓存和过滤逻辑问题 * fix(route): 修复 360 搜索缺少 cookie 的问题 * fix(route): 修复 360 搜索 cookie 的问题 * feat(route): 移除 so.com 路由 * fix: merge conflict ---------
94 lines
3.4 KiB
JavaScript
94 lines
3.4 KiB
JavaScript
module.exports = {
|
|
'baidu.com': {
|
|
_name: '百度',
|
|
www: [
|
|
{
|
|
title: '搜索',
|
|
docs: 'https://docs.rsshub.app/routes/other#bai-du-sou-suo',
|
|
source: ['/'],
|
|
target: (params, url) => {
|
|
const keyword = new URL(url).searchParams.get('wd');
|
|
return `/baidu/search/${keyword}`;
|
|
},
|
|
},
|
|
],
|
|
gushitong: [
|
|
{
|
|
title: '首页指数',
|
|
docs: 'https://docs.rsshub.app/routes/finance#bai-du-gu-shi-tong',
|
|
source: ['/'],
|
|
target: '/baidu/gushitong/index',
|
|
},
|
|
],
|
|
tieba: [
|
|
{
|
|
title: '帖子列表',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: 'f',
|
|
target: (params, url) => {
|
|
const type = new URL(url).searchParams.get('tab');
|
|
if (!type || type === 'main') {
|
|
return `/baidu/tieba/forum/${new URL(url).searchParams.get('kw')}`;
|
|
}
|
|
},
|
|
},
|
|
{
|
|
title: '精品帖子',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: 'f',
|
|
target: (params, url) => {
|
|
const type = new URL(url).searchParams.get('tab');
|
|
if (type === 'good') {
|
|
return `/baidu/tieba/forum/good/${new URL(url).searchParams.get('kw')}`;
|
|
}
|
|
},
|
|
},
|
|
{
|
|
title: '帖子动态',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: '/p/:id',
|
|
target: '/baidu/tieba/post/:id',
|
|
},
|
|
{
|
|
title: '只看楼主',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: '/p/:id',
|
|
target: '/baidu/tieba/post/lz/:id',
|
|
},
|
|
{
|
|
title: '用户帖子',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: '/home/main',
|
|
target: (params, url) => {
|
|
const uid = new URL(url).searchParams.get('un');
|
|
if (uid) {
|
|
return `/baidu/tieba/user/${uid}`;
|
|
}
|
|
},
|
|
},
|
|
{
|
|
title: '贴吧搜索',
|
|
docs: 'https://docs.rsshub.app/routes/bbs#bai-du-tie-ba',
|
|
source: '/f/search/res',
|
|
target: (params, url) => {
|
|
const searchParams = new URL(url).searchParams;
|
|
const qw = searchParams.get('qw');
|
|
const kw = searchParams.get('kw');
|
|
if (qw) {
|
|
const route = `/baidu/tieba/user/${qw}`;
|
|
return kw ? `${route}/kw=${kw}` : route;
|
|
}
|
|
},
|
|
},
|
|
],
|
|
top: [
|
|
{
|
|
title: '热搜榜单',
|
|
docs: 'https://docs.rsshub.app/routes/other#bai-du-re-sou-bang-dan',
|
|
source: ['/board'],
|
|
target: (_, url) => `/baidu/top/${new URL(url).searchParams.get('tab')}`,
|
|
},
|
|
],
|
|
},
|
|
};
|