DIYgod/RSSHub · error · Error
No posts found for this channel. Please make sure the channe
Error message
No posts found for this channel. Please make sure the channel ID is correct and that the channel contains posts.
What it means
The Ganjing World posts route calls the v1.0c social-content API for a channel/owner id. If data.list is empty, it throws. Note the apiUrl query string has a stray trailing space inside the template literal, which can corrupt the query and contribute to empty results.
Source
Thrown at lib/routes/ganjingworld/channel/posts.ts:44
target: '/channel/posts/:id',
},
],
url: 'www.ganjingworld.com',
name: 'posts 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=posts`;
const apiUrl = `https://gw.ganjingworld.com/v1.0c/social-content/get-owner-posts?owner_id=${id}&start_key=&page_size=48&post_image=true&query=basic,post,owner,comment,view,like,is_liked,share `;
// const apiUrl = `https://gw.ganjingworld.com/v1.0c/social-content/get-owner-posts?owner_id=1fcahpcut9t3gz4zIvYSJR7qd1cs0c&start_key=&page_size=48&post_image=true&query=basic,post,owner,comment,view,like,is_liked,share%20Request%20Method `;
const parsed: ApiResponse = await ofetch<ApiResponse>(apiUrl);
if (parsed.data.list.length === 0) {
throw new Error('No posts found for this channel. Please make sure the channel ID is correct and that the channel contains posts.');
}
const title = parsed.data.list[0].channel.name;
const items = parsed.data.list.map((item) => {
const pubDate = new Date(item.time_scheduled);
const raw = item.text?.replaceAll('\n', '<br>') || '';
const textWithMedia = item.media?.length > 0 ? raw + `<figure><img src="${item.media[0].url}"></figure>` : raw;
return {
title: item.title,
link: `https://www.ganjingworld.com/news/${item.id}`,
pubDate,
description: textWithMedia,
};
});
return {
title,
link: url,View on GitHub (pinned to bed535e087)
Solutions
- Remove the trailing space in the apiUrl query string (it sits after 'share' inside the backticks).
- Confirm the id is an owner_id accepted by the social-content endpoint.
- Open the channel's posts tab in a browser to confirm posts exist.
- If the channel only has articles/shorts, use the corresponding route.
Example fix
// before
const apiUrl = `https://gw.ganjingworld.com/v1.0c/social-content/get-owner-posts?owner_id=${id}&start_key=&page_size=48&post_image=true&query=basic,post,owner,comment,view,like,is_liked,share `;
// after
const apiUrl = `https://gw.ganjingworld.com/v1.0c/social-content/get-owner-posts?owner_id=${id}&start_key=&page_size=48&post_image=true&query=basic,post,owner,comment,view,like,is_liked,share`; Defensive patterns
Strategy: validation
Validate before calling
// fix the trailing-space bug AND validate
const apiUrl = `https://gw.ganjingworld.com/v1.0c/social-content/get-owner-posts?owner_id=${encodeURIComponent(id)}&start_key=&page_size=48&post_image=true&query=basic,post,owner,comment,view,like,is_liked,share`;
if (!id.trim()) throw new InvalidParameterError('id is required'); Type guard
const hasPosts = (res: ApiResponse): boolean => res.data.list.length > 0;
Prevention
- Remove the stray trailing space in the query string. Confirm owner_id vs channel_id semantics. URL-encode the id.
When it happens
Trigger: Passing an id with no posts, an id that is a channel id rather than an owner id (the API param is owner_id), or the trailing space in the query string causing the server to misparse parameters and return an empty list.
Common situations: Channel-vs-owner id confusion; brand-new channels with no posts; the stray trailing space bug intermittently breaking the request.
Related errors
- No articles found for this channel. Please make sure the cha
- No shorts found for this channel. Please make sure the chann
- Not found ${type} in ${id}: ${currentUrl}
- This user has no articles.
- ${tagResponse.msg}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/6dd281d89db117a6.
Report an issue: GitHub.