DIYgod/RSSHub · error · Error

Unable to determine the current People’s Daily edition date

Error message

Unable to determine the current People’s Daily edition date

What it means

Error "Unable to determine the current People’s Daily edition date" thrown in DIYgod/RSSHub.

Source

Thrown at lib/routes/people/paper.ts:28

const indexUrl = `${rootUrl}layout/index.html`;
const defaultLimit = 30;

type PaperPage = {
    id: string;
    title: string;
    url: string;
};

type PaperArticle = DataItem & {
    link: string;
};

const normalizeText = (text: string) => text.replaceAll(/\s+/g, ' ').trim();

const getEditionDate = (url: string) => {
    const match = url.match(/\/(\d{4})(\d{2})\/(\d{2})\//);
    if (!match) {
        throw new Error('Unable to determine the current People’s Daily edition date');
    }
    return `${match[1]}年${match[2]}月${match[3]}日`;
};

const getPages = async () => {
    const html = await ofetch<string>(indexUrl);
    const $ = load(html);
    const pages = $('#list li a[href]')
        .toArray()
        .map((element) => {
            const href = $(element).attr('href') ?? '';
            const id = href.match(/node_(\d+)\.html/)?.[1];
            return id
                ? {
                      id,
                      title: normalizeText($(element).text()),
                      url: new URL(href, indexUrl).href,
                  }

View on GitHub (pinned to bed535e087)

Solutions

  1. The People’s Daily site layout may have changed; open an issue so the edition URL parsing can be updated.
  2. Retry later in case of a transient fetch problem.

When it happens

Trigger: The edition page URL does not match the expected /YYYYMM/DD/ date pattern, so the edition date cannot be parsed.

Common situations: See trigger scenarios.


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