DIYgod/RSSHub · error · InvalidParameterError

Comic Not Found - ${name}

Error message

Comic Not Found - ${name}

What it means

After fetching a Comics Kingdom page the route scrapes every `div.tile` for its first anchor href. If zero links are found it interprets the empty result as a non-existent comic and throws InvalidParameterError echoing the supplied `name`. An empty link list can also be caused by selector drift rather than a bad name.

Source

Thrown at lib/routes/comicskingdom/index.tsx:51

async function handler(ctx) {
    const baseURL = 'https://comicskingdom.com';
    const name = ctx.req.param('name');
    const url = `${baseURL}/${name}/archive`;
    const { data } = await got(url);

    const $ = load(data);

    // Determine Comic and Author from main page
    const comic = $('title').text().replace('Comics Kingdom - ', '').trim();
    const author = $('.feature-title h2').text();

    // Find the links for all non-archived items
    const links = $('div.tile')
        .toArray()
        .map((el) => $(el).find('a').first().attr('href'));

    if (links.length === 0) {
        throw new InvalidParameterError(`Comic Not Found - ${name}`);
    }
    const items = await Promise.all(
        links.map((link) =>
            cache.tryGet(link!, async () => {
                const detailResponse = await got(link);
                const content = load(detailResponse.data);

                const title = content('meta[property="og:description"]').attr('content');
                const image = content('meta[property="og:image"]').attr('content');
                const description = renderToString(<img src={image} />);
                // Pull the date out of the URL
                const pubDate = parseDate(link!.slice(link!.lastIndexOf('/') + 1), 'YYYY-MM-DD');

                return {
                    title: title!,
                    author,
                    category: 'comic',
                    description,

View on GitHub (pinned to bed535e087)

Solutions

  1. Confirm the comic slug by browsing comicskingdom.com and copying the exact path segment.
  2. If the slug is valid but the error persists, the `div.tile` selector has likely drifted — inspect the current HTML and update it.
  3. Report a stale selector to the maintainer with a sample of the new markup.

Example fix

// before
//   $('div.tile').toArray().map((el) => $(el).find('a').first().attr('href'));
// after (example selector refresh)
//   $('div.comic-tile').toArray().map((el) => $(el).find('a').first().attr('href'));
Defensive patterns

Strategy: validation

Validate before calling

async function comicExists(name: string): Promise<boolean> {
  const res = await got(`https://www.comicskingdom.com/${name}`);
  const $ = load(res.data);
  return $('div.tile').toArray().length > 0;
}

Prevention

When it happens

Trigger: `/comicskingdom/<name>` where <name> does not resolve to a real comic, or where the site has changed so `div.tile` no longer matches the listing.

Common situations: Typo in the comic slug; the comic was archived or renamed; a site redesign removed or renamed the `div.tile` container so even valid comics yield zero links.

Related errors


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