DIYgod/RSSHub · error · Error
No news found
Error message
No news found
What it means
Generic Error thrown when the category-specific list parser (parsers[category]) returned an empty array from the scraped Blizzard news page HTML. It is a content-availability guard: the request and parse succeeded but no items were extracted, almost always meaning the page structure changed or the page returned a block/interstitial.
Source
Thrown at lib/routes/blizzard/news-cn.ts:127
item.description = parseDetail($);
return item;
});
}
async function handler(ctx) {
const category = ctx.req.param('category') || 'ow';
if (!Object.hasOwn(categoryNames, category)) {
throw new Error('Invalid category');
}
const rootUrl = `https://${category}.blizzard.cn/news`;
const response = await ofetch(rootUrl);
const $ = load(response);
const list = getList(category, $);
if (!list.length) {
throw new Error('No news found');
}
const items = await Promise.all(list.map((item) => fetchDetail(item, category)));
return {
title: `${categoryNames[category]}新闻`,
link: rootUrl,
item: items,
};
}
View on GitHub (pinned to bed535e087)
Solutions
- Open the category's news page in a browser and confirm the current DOM; update the selectors in parsers[category] if they changed.
- Check whether Blizzard.cn is geo-blocking the server IP (try from a CN IP or add headers).
- Retry later if the page was temporarily empty/under maintenance.
Example fix
// before
if (!list.length) {
throw new Error('No news found');
}
// after (hint at the likely cause)
if (!list.length) {
throw new Error(`No news found for ${category} — selectors may be stale or page is blocked`);
} Defensive patterns
Strategy: fallback
Validate before calling
const list = getList(category, $);
if (!list.length) {
throw new Error(`No news found for ${category} — selectors may be stale or page is blocked`);
} Type guard
const hasNewsItems = (list: unknown[]): boolean => Array.isArray(list) && list.length > 0;
Try / catch
// Degrade gracefully: if the primary parse is empty, try an alternate selector set // or return allowEmpty instead of throwing, so feed consumers are not hard-failed. let list = getList(category, $); if (!list.length) list = getListFallback(category, $);
Prevention
- Pin selectors to stable, semantic containers; add fallback selector sets.
- Add a snapshot test against a saved HTML fixture to detect selector drift.
- Distinguish 'page blocked' from 'page changed' by logging a snippet of the fetched HTML.
When it happens
Trigger: ofetch fetched https://{category}.blizzard.cn/news successfully, cheerio loaded it, but the selector for that category (e.g. '.list-data-container .list-item-container' for ow) matched zero nodes.
Common situations: Blizzard redesigned the news page DOM and the CSS selectors are stale; Blizzard.cn returning a maintenance/geo-block page; the category temporarily has no news items.
Related errors
- this route is empty, please check the original site or <a hr
- Unknown type: ${item.type}
- Comic Not Found - ${name}
- Empty content: ${articleUrl}
- 无法获取最新的 year 和 issue
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/672a8c60af38bed8.
Report an issue: GitHub.