{"record":{"id":"7f4535b92b9c0d84","repo":"DIYgod/RSSHub","slug":"failed-to-find-article-content","errorCode":null,"errorMessage":"Failed to find article content.","messagePattern":"Failed to find article content\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/routes/openai/chatgpt-atlas.ts","lineNumber":37,"sourceCode":"        supportScihub: false,\n    },\n    name: 'ChatGPT Atlas - Release Notes',\n    maintainers: ['xbot'],\n    handler,\n};\n\nasync function handler() {\n    const articleUrl = 'https://help.openai.com/en/articles/12591856-chatgpt-atlas-release-notes';\n\n    const cacheIn = await cache.tryGet(\n        articleUrl,\n        async () => {\n            const response = await ofetch(articleUrl);\n            const $ = load(response);\n            const articleContent = $('.article-content');\n\n            if (articleContent.length === 0) {\n                throw new Error('Failed to find article content.');\n            }\n\n            const feedTitle = $('h1').first().text();\n            const feedDesc = 'ChatGPT Atlas Release Notes';\n\n            const items = $('h1', articleContent)\n                .toArray()\n                .map((element) => {\n                    const $h1 = $(element);\n                    const text = $h1.text().trim();\n\n                    const dateMatch = text.match(/(\\w+\\s+\\d+[stndrh]*,\\s+\\d{4})/i);\n                    let pubDate: Date | undefined;\n                    if (dateMatch) {\n                        const dateStr = dateMatch[1];\n                        const parsedDate = dayjs(dateStr, ['MMMM Do, YYYY', 'MMMM D, YYYY'], 'en');\n                        if (parsedDate.isValid()) {\n                            pubDate = parsedDate.toDate();","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/openai/chatgpt-atlas.ts#L19-L55","documentation":"Thrown when the Cheerio selector `.article-content` returns zero elements on the OpenAI help page for ChatGPT Atlas release notes. The handler fetches `https://help.openai.com/en/articles/12591856-chatgpt-atlas-release-notes`, loads it with Cheerio, and expects an element with class `article-content` to exist. Its absence means the page structure changed or the page did not load correctly.","triggerScenarios":"The OpenAI help center changed its HTML template (removing or renaming the `article-content` class). The page returned a JS-rendered SPA shell with no server-side content. The article URL was changed or the article was taken down. A CDN error page was served instead.","commonSituations":"OpenAI redesigned their help center. The article ID `12591856` was changed. The help center now requires JavaScript rendering (client-side hydration) that Cheerio cannot execute.","solutions":["Open `https://help.openai.com/en/articles/12591856-chatgpt-atlas-release-notes` and inspect the page source for the current content container class.","Update the selector on line 33 of `lib/routes/openai/chatgpt-atlas.ts` to match the new class name.","If the page is now client-rendered, switch to Puppeteer or find the underlying API endpoint.","Verify the article URL is still valid and not redirected."],"exampleFix":"// before\nconst articleContent = $('.article-content');\nif (articleContent.length === 0) {\n    throw new Error('Failed to find article content.');\n}\n\n// after — try multiple known selectors\nconst articleContent = $('.article-content').length ? $('.article-content') : $('article');\nif (articleContent.length === 0) {\n    throw new Error('Failed to find article content.');\n}","handlingStrategy":"try-catch","validationCode":"// Pre-check: verify the article page contains expected content markers\nconst response = await ofetch(articleUrl);\nif (!response.includes('article-content') && !response.includes('<article')) {\n    throw new Error('OpenAI help page structure may have changed');\n}","typeGuard":null,"tryCatchPattern":"try {\n    const response = await ofetch(articleUrl);\n    const $ = load(response);\n    const articleContent = $('.article-content');\n    if (articleContent.length === 0) {\n        throw new Error('Failed to find article content.');\n    }\n} catch (e) {\n    logger.error('OpenAI Atlas help page could not be parsed: HTML structure may have changed');\n    throw e;\n}","preventionTips":["Use multiple fallback selectors instead of relying on a single class name.","Monitor the OpenAI help center for template changes.","Cache successful parses to reduce the impact of transient page structure issues."],"tags":["scraper","openai","cheerio","fragile-selector","html-parsing"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}