DIYgod/RSSHub · warning · Error

No articles found for this channel. Please make sure the cha

Error message

No articles found for this channel. Please make sure the channel ID is correct and that the channel contains articles.

What it means

The Ganjing World articles route calls the v1.1 content API filtered by content_type=News for a given channel id. If the returned data.list is empty, the channel either does not exist, is not a news channel, or has zero articles, so the route throws a descriptive error instead of returning an empty feed (which RSSHub's internal checks would also flag).

Source

Thrown at lib/routes/ganjingworld/channel/articles.ts:45

            target: '/channel/articles/:id',
        },
    ],
    url: 'www.ganjingworld.com',
    name: 'Articles in a channel',
    maintainers: ['yixiangli2001'],

    handler,
};

async function handler(ctx) {
    const id = ctx.req.param('id');
    const url = `https://www.ganjingworld.com/channel/${id}?tab=articles`;
    const apiUrl = `https://gw.ganjingworld.com/v1.1/content/get-by-channel?channel_id=${id}&content_type=News`;
    // const apiUrl = `https://gw.ganjingworld.com/v1.1/content/get-by-channel?channel_id=1fcahpcut9t3gz4zIvYSJR7qd1cs0c&content_type=News`;

    const parsed: ApiResponse = await ofetch<ApiResponse>(apiUrl);
    if (parsed.data.list.length === 0) {
        throw new Error('No articles found for this channel. Please make sure the channel ID is correct and that the channel contains articles.');
    }
    const title = parsed.data.list[0].channel.name;
    const items = await Promise.all(
        parsed.data.list.map((item) =>
            cache.tryGet(item.id, async () => {
                const pubDate = new Date(item.time_scheduled);
                const fetchArticleUrl = `https://gw.ganjingworld.com/v1.1/content/query?lang=zh-TW&query=basic%2Cfull%2Ctranslations%2Clike%2Cshare%2Csave%2Cview%2Ctag_list&ids=${item.id}`;
                const parsedArticle: ApiResponse = await ofetch<ApiResponse>(fetchArticleUrl);

                const description = parsedArticle.data.list[0]?.text ?? '';

                return {
                    title: item.title,
                    link: `https://www.ganjingworld.com/news/${item.id}`,
                    pubDate,
                    description,
                };
            })

View on GitHub (pinned to bed535e087)

Solutions

  1. Open https://www.ganjingworld.com/channel/{id}?tab=articles in a browser and confirm articles are listed there.
  2. Verify the id is a channel id and not a user/owner id.
  3. If the channel intentionally has no articles, point the user at the /posts or /shorts route instead.

Example fix

// before
if (parsed.data.list.length === 0) {
    throw new Error('No articles found for this channel. ...');
}

// after
if (parsed.data.list.length === 0) {
    throw new InvalidParameterError(`Channel "${id}" has no articles. Verify the channel ID and its content type (try the posts or shorts route).`);
}
Defensive patterns

Strategy: validation

Validate before calling

// pre-flight: confirm the channel exists and has a News tab
const probe = await ofetch(`https://gw.ganjingworld.com/v1.1/content/get-by-channel?channel_id=${id}&content_type=News&page_size=1`);
if (probe.data.list.length === 0) {
  throw new InvalidParameterError(`Channel ${id} has no articles`);
}

Type guard

const hasArticles = (res: ApiResponse): boolean => res.data.list.length > 0;

Prevention

When it happens

Trigger: Passing a channel id that exists but publishes only posts/shorts (not News), a channel id that does not exist at all (API returns 200 with empty list), or a channel whose articles are all in a non-public visibility state.

Common situations: Confusing channel types (a video-only channel queried for articles); copying a user id instead of a channel id; the channel being new with no articles yet.

Related errors


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