{"record":{"id":"cab249d008a1f35d","repo":"DIYgod/RSSHub","slug":"failed-to-find-article-content-cab249","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.ts","lineNumber":38,"sourceCode":"    },\n    name: 'ChatGPT - Release Notes',\n    maintainers: ['xbot'],\n    handler,\n};\n\nasync function handler() {\n    const articleUrl = 'https://help.openai.com/en/articles/6825453-chatgpt-release-notes';\n\n    const cacheIn = await cache.tryGet(\n        articleUrl,\n        async () => {\n            const response = await ofetch(articleUrl);\n\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 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":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/openai/chatgpt.ts#L20-L56","documentation":"Thrown when the Cheerio selector `.article-content` returns zero elements on the OpenAI help page for ChatGPT release notes. The handler fetches `https://help.openai.com/en/articles/6825453-chatgpt-release-notes` and expects a `.article-content` element. This is the same pattern as the Atlas variant but for the main ChatGPT release notes article.","triggerScenarios":"The OpenAI help center changed its HTML structure so `.article-content` no longer exists. The article was moved or the ID `6825453` is stale. A JS-rendered SPA returned an empty shell. An error/redirect page was served.","commonSituations":"OpenAI redesigned their help center template. The article was reorganized with a new URL. The help center moved to a client-side rendering approach incompatible with Cheerio.","solutions":["Open `https://help.openai.com/en/articles/6825453-chatgpt-release-notes` and inspect the HTML for the current content wrapper class.","Update the selector on line 34 of `lib/routes/openai/chatgpt.ts` to match.","If the page is now SPA-rendered, switch to Puppeteer or locate the API endpoint the page uses.","Verify the article URL still resolves without redirect."],"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 ChatGPT help page could not be parsed: HTML structure may have changed');\n    throw e;\n}","preventionTips":["Use multiple fallback selectors for the content container.","Periodically verify the article URL still resolves.","Cache successful parses with a reasonable TTL."],"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"}