{"record":{"id":"0aa906efb5d8b548","repo":"DIYgod/RSSHub","slug":"no-articles-were-found-for-yearmonth-day","errorCode":null,"errorMessage":"No articles were found for ${yearMonth}${day}.","messagePattern":"No articles were found for (.+?)(.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":503,"severity":"error","filePath":"lib/routes/fjdaily/index.ts","lineNumber":183,"sourceCode":"                return;\n            }\n\n            const a = element.find('a').first();\n            const href = a.attr('href');\n            if (!href) {\n                return;\n            }\n\n            return {\n                title: a.text().replaceAll(/\\s+/g, ' ').trim(),\n                link: new URL(href, padUrl).href.replace('/pad/', '/pc/'),\n                category: [currentCategory.replace(/^\\d+版\\s*/, '')],\n            };\n        })\n        .filter((item) => item !== undefined);\n\n    if (list.length === 0) {\n        throw new Error(`No articles were found for ${yearMonth}${day}.`);\n    }\n\n    const items = await Promise.all(\n        list.map((item) =>\n            cache.tryGet(item.link!, async () => {\n                const detailResponse = await got(item.link!);\n                const detail = load(detailResponse.data);\n                const pubDate = detail('#NewsArticlePubDay').text();\n                const author = detail('#NewsArticleAuthor').text();\n                const description = getItemDescription(detail);\n\n                return {\n                    ...item,\n                    author: author || undefined,\n                    description: description || undefined,\n                    pubDate: pubDate ? timezone(parseDate(pubDate), 8) : undefined,\n                };\n            })","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/fjdaily/index.ts#L165-L201","documentation":"Thrown by the Fjdaily route after parsing the edition's catalog page (`pad/col/<yearMonth>/<day>/node_01.html`) when zero article entries are found. The route scrapes `#catalog li` elements and maps them to article items. If the list is empty — either because the edition has no articles, the page returned an error, or the selector broke — the check `list.length === 0` fires.","triggerScenarios":"A date is specified for a day that had no publication (e.g., a national holiday where no edition was printed). The catalog page returned a 404 or error page that cheerio parsed as valid HTML with no `#catalog li` elements. The selector `#catalog li` changed after a site update.","commonSituations":"User passes a future date that has no edition yet. User passes a date for a non-publication day. The pad-version of the page is deprecated or moved. The site changed the catalog container ID or class.","solutions":["Verify the edition exists by opening `https://fjrb.fjdaily.com/pc/col/<yearMonth>/<day>/node_01.html` in a browser.","Try a known publication date or omit the date parameter to get the latest edition.","If the page exists but the selector broke, inspect the HTML and update `#catalog li` in the handler.","Check if the date falls on a holiday or weekend with no print edition."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Validate the edition exists and has articles before processing\nasync function editionHasArticles(yearMonth: string, day: string): Promise<boolean> {\n    try {\n        const response = await got(`${ROOT_URL}/pad/col/${yearMonth}/${day}/node_01.html`);\n        const $ = load(response.data);\n        return $('#catalog li').toArray().length > 0;\n    } catch {\n        return false;\n    }\n}","typeGuard":"function hasCatalogEntries($: cheerio.CheerioAPI): boolean {\n    return $('#catalog li').toArray().filter((el) => $(el).find('a').first().attr('href')).length > 0;\n}","tryCatchPattern":"const list = content('#catalog li').toArray().map(/* ... */).filter(Boolean);\nif (list.length === 0) {\n    // Provide actionable guidance in the error\n    throw new Error(\n        `No articles found for ${yearMonth}${day}. ` +\n        `Verify the edition exists at ${ROOT_URL}/pc/col/${yearMonth}/${day}/node_01.html ` +\n        `or try omitting the date for the latest edition.`\n    );\n}","preventionTips":["Omit the date parameter to get the latest edition, which is more likely to exist.","Verify the edition date is a publication day (check for holidays/weekends).","Inspect the catalog page HTML to ensure the #catalog li selector is still valid.","Provide a helpful error message with the verification URL."],"tags":["scraping","empty-results","selector-breakage","fjdaily"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}