DIYgod/RSSHub · error

Comic Not Found - ${name}

Error message

Comic Not Found - ${name}

What it means

Thrown by the gocomics route when the comic landing page yields no 'previous comic' link, i.e. `$('.gc-deck--cta-0 a').attr('href')` is undefined. The route treats a missing previous-link as 'this comic does not exist (or the page is not a real comic page)' and aborts, including the requested name in the message.

Source

Thrown at lib/routes-deprecated/gocomics/index.js:26

    const url = `${baseURL}/${name}/`;
    const response = await got({
        method: 'get',
        url,
    });

    const data = response.data;
    const $ = cheerio.load(data);

    // Determine Comic and Author from main page
    const comic = $('.media-heading').eq(0).text();
    const author = $('.media-subheading').eq(0).text().replace('By ', '');

    // Load previous comic URL
    const items = [];
    let previous = $('.gc-deck--cta-0 a').attr('href');

    if (!previous) {
        throw new Error(`Comic Not Found - ${name}`);
    }

    while (items.length < limit) {
        const link = `${baseURL}${previous}`;
        /* eslint-disable no-await-in-loop */
        const item = await ctx.cache.tryGet(link, async () => {
            const detailResponse = await got({
                method: 'get',
                url: link,
            });
            const content = cheerio.load(detailResponse.data);

            const title = content('h1.m-0').eq(0).text();
            const image = content('.comic.container').eq(0).attr('data-image');
            const description = `<img src="${image}" />`;
            // Pull the date out of the URL
            const pubDate = new Date(link.split('/').slice(-3).join('/')).toUTCString();
            const previous = content('.js-previous-comic').eq(0).attr('href');

View on GitHub (pinned to bed535e087)

Solutions

  1. Open https://www.gocomics.com/<name> in a browser and confirm it is a valid comic.
  2. Correct the slug to the canonical one shown on gocomics.com.
  3. If the slug is valid but the error persists, the selector likely broke — update `.gc-deck--cta-0 a` in the route and report upstream.
  4. Verify the request is not being geo-blocked or redirected.

Example fix

// before
/gocomics/calvinandhobes
// after
/gocomics/calvinandhobbes
Defensive patterns

Strategy: validation

Validate before calling

const previous = $('.gc-deck--cta-0 a').attr('href');
if (!previous) throw new Error(`Comic Not Found - ${name}`);

Type guard

const isRealComicPage = ($: cheerio.CheerioAPI): boolean =>
  !!$('.gc-deck--cta-0 a').attr('href') && !!$('.media-heading').eq(0).text();

Prevention

When it happens

Trigger: The `name` path parameter does not match a real gocomics comic slug; the comic was removed/renamed; gocomics changed its page markup so the `.gc-deck--cta-0` selector no longer matches; the page returned an error/redirect that still has no previous link.

Common situations: Typo in the comic slug (e.g. '/calvinandhobbes' vs '/calvinandhobbes'); requesting a comic that was retired; site redesign breaks the selector; geo-block returns a stub page.

Related errors


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