DIYgod/RSSHub · error · Error
pianyuan 搜索失败
Error message
pianyuan 搜索失败
What it means
Error "pianyuan 搜索失败" thrown in DIYgod/RSSHub.
Source
Thrown at lib/routes/pianyuan/search.ts:39
url: 'pianyuan.org/',
description: '搜索路由模仿 jackett 的搜索 api, 以提供给 nastools 使用,填写在 nastools 配置 indexer 中',
};
async function handler(ctx) {
const link_base = 'https://pianyuan.org/';
const description = '搜索';
// 适配jackett 搜索api, eg: https://rsshub.app/pianyuan/indexers/pianyuan/results/search/api?t=test&q=halo
const searchKey = ctx.originalUrl.split('&q=', 2)[1];
const link = link_base + `search?q=${searchKey}`;
const response = await utils.request(link, cache);
const $ = load(response.data);
// 只获取第一页的搜索结果
const searchLinks = $('.nomt > a')
.toArray()
.map((a) => $(a).attr('href'));
if (searchLinks.length === 0) {
throw new Error('pianyuan 搜索失败');
}
const detailLinks: Array<string | undefined> = [];
await Promise.all(
searchLinks.map(async (e) => {
const link = new URL(e!, link_base).href;
const single = await cache.tryGet(link, async (): Promise<any> => {
const res = await utils.request(link, cache);
const content = load(res.data);
detailLinks.push(
...content('.ico.ico_bt')
.toArray()
.map((a) => $(a).attr('href'))
);
});
return single;
})View on GitHub (pinned to bed535e087)
Solutions
- Check the search keyword and retry.
- The pianyuan site may be blocking requests; configure the required cookie and retry later.
When it happens
Trigger: The pianyuan search request fails or returns an error response.
Common situations: See trigger scenarios.
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/78b305bfe7fd4c42.
Report an issue: GitHub.