DIYgod/RSSHub · error · Error
文章列表获取失败,可能是被临时限制了访问,请稍后重试 ${JSON.stringify(resp.data)}
Error message
文章列表获取失败,可能是被临时限制了访问,请稍后重试
${JSON.stringify(resp.data)} What it means
Thrown by the GDUT OA news route after a POST to the Seeyon AJAX endpoint (/ajax.do?method=ajaxAction&managerName=ggManager) when the response body lacks a 'data' property (resp.data.data is falsy). The error message appends JSON.stringify(resp.data) for diagnostic purposes. The route documentation notes the school may restrict access from non-campus IPs.
Source
Thrown at lib/routes/gdut/oa-news.ts:108
const type = typeMap[typeParam];
// 获取cookie
const cookieJar = new CookieJar();
await got(site + '/ggIP.do?method=portalSeachMore&subject=&departmentName=&newsType=&startDate=&endDate=', {
cookieJar,
});
// 获取文章列表
const listUrl = '/ajax.do?method=ajaxAction&managerName=ggManager&rnd=1';
const resp = await got.post(site + listUrl, {
cookieJar,
form: {
managerMethod: 'kkFindListDatas',
arguments: getArg(type),
},
});
if (!resp.data.data) {
throw new Error('文章列表获取失败,可能是被临时限制了访问,请稍后重试\n' + JSON.stringify(resp.data));
}
// 构造文章数组
const articles: Array<DataItem & { link: string }> = resp.data.data.map((item): DataItem & { link: string } => ({
title: item.title,
guid: item.id,
link: site + '/newsData.do?method=newsView&newsId=' + item.id,
pubDate: timezone(parseDate(item.publishDate), 8),
author: item.publishUserDepart,
category: item.typeName,
}));
const results = await pMap(
articles,
async (data) => {
const link = data.link;
data.description = (await cache.tryGet(link, async () => {
// 获取数据View on GitHub (pinned to bed535e087)
Solutions
- Run RSSHub from within the GDUT campus network, or use a campus-network VPN/proxy, as the description warns
- Retry after a few minutes in case of transient rate-limiting
- Inspect the JSON in the error message — if it contains a login redirect or error, the session cookie logic may need updating
- Verify the getArg() function produces valid arguments for the Seeyon AJAX contract
Example fix
// before
if (!resp.data.data) {
throw new Error('文章列表获取失败,可能是被临时限制了访问,请稍后重试\n' + JSON.stringify(resp.data));
}
// after (include the HTTP status and a structured hint)
if (!resp.data.data) {
throw new Error(`Article list fetch failed (likely IP restriction or rate limit). HTTP ${resp.statusCode}. Response: ${JSON.stringify(resp.data)}`);
} Defensive patterns
Strategy: retry
Try / catch
// The error is thrown after the API call. Wrap in retry with backoff:
const MAX_RETRIES = 3;
let lastError;
for (let i = 0; i < MAX_RETRIES; i++) {
try {
const resp = await got.post(site + listUrl, { cookieJar, form: {...} });
if (resp.data.data) {
// success
break;
}
throw new Error('No data in response');
} catch (e) {
lastError = e;
await new Promise(r => setTimeout(r, (i + 1) * 5000));
}
} Prevention
- Run RSSHub from within the GDUT campus network for this route
- Implement retry with exponential backoff for transient IP restrictions
- Log the full response body to diagnose API contract changes
- Share a campus-network proxy among multiple RSSHub instances
When it happens
Trigger: The Seeyon OA system returns a JSON response without the expected 'data' array — typically an error object, empty object, or login redirect payload. This happens when the server IP-blocks non-campus traffic, when the CookieJar session is invalid/expired, or when the form arguments are malformed.
Common situations: Self-hosting RSSHub outside the GDUT campus network (the description explicitly warns IP restrictions apply for department, academy, notice, and announcement types); the CookieJar initialization request (ggIP.do) succeeded but the subsequent POST was rejected; transient server-side throttling.
Related errors
- 无法获取用户信息
- 日报数据不存在或为空
- ${tagResponse.msg}
- 访问量过大,触发验证码
- 中国政府网搜索接口请求失败,错误代码:${response?.resultCode?.code ?? '未知'}
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/c3e7ce3b94dc8dce.
Report an issue: GitHub.