{"record":{"id":"672a8c60af38bed8","repo":"DIYgod/RSSHub","slug":"no-news-found","errorCode":null,"errorMessage":"No news found","messagePattern":"No news found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/blizzard/news-cn.ts","lineNumber":127,"sourceCode":"        item.description = parseDetail($);\n        return item;\n    });\n}\n\nasync function handler(ctx) {\n    const category = ctx.req.param('category') || 'ow';\n    if (!Object.hasOwn(categoryNames, category)) {\n        throw new Error('Invalid category');\n    }\n\n    const rootUrl = `https://${category}.blizzard.cn/news`;\n\n    const response = await ofetch(rootUrl);\n    const $ = load(response);\n\n    const list = getList(category, $);\n    if (!list.length) {\n        throw new Error('No news found');\n    }\n\n    const items = await Promise.all(list.map((item) => fetchDetail(item, category)));\n\n    return {\n        title: `${categoryNames[category]}新闻`,\n        link: rootUrl,\n        item: items,\n    };\n}\n","sourceCodeStart":109,"sourceCodeEnd":138,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/blizzard/news-cn.ts#L109-L138","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nif (!list.length) {\n    throw new Error('No news found');\n}\n// after (hint at the likely cause)\nif (!list.length) {\n    throw new Error(`No news found for ${category} — selectors may be stale or page is blocked`);\n}","handlingStrategy":"fallback","validationCode":"const list = getList(category, $);\nif (!list.length) {\n    throw new Error(`No news found for ${category} — selectors may be stale or page is blocked`);\n}","typeGuard":"const hasNewsItems = (list: unknown[]): boolean => Array.isArray(list) && list.length > 0;","tryCatchPattern":"// Degrade gracefully: if the primary parse is empty, try an alternate selector set\n// or return allowEmpty instead of throwing, so feed consumers are not hard-failed.\nlet list = getList(category, $);\nif (!list.length) list = getListFallback(category, $);","preventionTips":["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."],"tags":["blizzard","scraping","selectors","html","empty-result"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}