DIYgod/RSSHub · error · Error

No articles were found for ${yearMonth}${day}.

Error message

No articles were found for ${yearMonth}${day}.

What it means

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.

Source

Thrown at lib/routes/fjdaily/index.ts:183

                return;
            }

            const a = element.find('a').first();
            const href = a.attr('href');
            if (!href) {
                return;
            }

            return {
                title: a.text().replaceAll(/\s+/g, ' ').trim(),
                link: new URL(href, padUrl).href.replace('/pad/', '/pc/'),
                category: [currentCategory.replace(/^\d+版\s*/, '')],
            };
        })
        .filter((item) => item !== undefined);

    if (list.length === 0) {
        throw new Error(`No articles were found for ${yearMonth}${day}.`);
    }

    const items = await Promise.all(
        list.map((item) =>
            cache.tryGet(item.link!, async () => {
                const detailResponse = await got(item.link!);
                const detail = load(detailResponse.data);
                const pubDate = detail('#NewsArticlePubDay').text();
                const author = detail('#NewsArticleAuthor').text();
                const description = getItemDescription(detail);

                return {
                    ...item,
                    author: author || undefined,
                    description: description || undefined,
                    pubDate: pubDate ? timezone(parseDate(pubDate), 8) : undefined,
                };
            })

View on GitHub (pinned to bed535e087)

Solutions

  1. Verify the edition exists by opening `https://fjrb.fjdaily.com/pc/col/<yearMonth>/<day>/node_01.html` in a browser.
  2. Try a known publication date or omit the date parameter to get the latest edition.
  3. If the page exists but the selector broke, inspect the HTML and update `#catalog li` in the handler.
  4. Check if the date falls on a holiday or weekend with no print edition.
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate the edition exists and has articles before processing
async function editionHasArticles(yearMonth: string, day: string): Promise<boolean> {
    try {
        const response = await got(`${ROOT_URL}/pad/col/${yearMonth}/${day}/node_01.html`);
        const $ = load(response.data);
        return $('#catalog li').toArray().length > 0;
    } catch {
        return false;
    }
}

Type guard

function hasCatalogEntries($: cheerio.CheerioAPI): boolean {
    return $('#catalog li').toArray().filter((el) => $(el).find('a').first().attr('href')).length > 0;
}

Try / catch

const list = content('#catalog li').toArray().map(/* ... */).filter(Boolean);
if (list.length === 0) {
    // Provide actionable guidance in the error
    throw new Error(
        `No articles found for ${yearMonth}${day}. ` +
        `Verify the edition exists at ${ROOT_URL}/pc/col/${yearMonth}/${day}/node_01.html ` +
        `or try omitting the date for the latest edition.`
    );
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/0aa906efb5d8b548. Report an issue: GitHub.