{"record":{"id":"75e384cd0ff4165e","repo":"jackwener/OpenCLI","slug":"sogou-weixin-returned-article-cards-without-requir","errorCode":null,"errorMessage":"Sogou Weixin returned article cards without required title or URL","messagePattern":"Sogou Weixin returned article cards without required title or URL","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/weixin/search.js","lineNumber":129,"sourceCode":"        let payload;\n        try {\n            await page.goto(searchUrl);\n            await page.wait(2);\n            payload = await page.evaluate(buildExtractSearchResultsEvaluate());\n        }\n        catch (error) {\n            const detail = error instanceof Error ? error.message : String(error);\n            throw new CommandExecutionError('weixin search failed while loading Sogou results', detail);\n        }\n\n        if (!payload || typeof payload !== 'object' || !Array.isArray(payload.rows)) {\n            throw new CommandExecutionError('weixin search returned an unreadable browser payload', 'Sogou Weixin may have changed its result page structure.');\n        }\n        if (payload.blocked) {\n            throw new CommandExecutionError('Sogou Weixin blocked this search request', 'Open weixin.sogou.com in Chrome and complete any verification before retrying.');\n        }\n        if (payload.invalidCount > 0) {\n            throw new CommandExecutionError('Sogou Weixin returned article cards without required title or URL', 'The result page structure may have changed; refusing to return a partial result set.');\n        }\n\n        const rows = payload.rows;\n        if (rows.length === 0 && payload.empty) {\n            throw new EmptyResultError('weixin search', 'Try a different keyword or a different page number.');\n        }\n        if (rows.length === 0) {\n            throw new CommandExecutionError('weixin search did not expose article result cards', 'Sogou Weixin may have changed its selectors or returned a transient shell page.');\n        }\n\n        return rows.slice(0, limit).map((row, index) => ({\n            rank: (pageNo - 1) * 10 + index + 1,\n            page: pageNo,\n            title: row.title,\n            url: row.url,\n            summary: row.summary,\n            publish_time: row.publish_time,\n        }));","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/weixin/search.js#L111-L147","documentation":"Thrown when Sogou returned result cards but `invalidCount > 0`, i.e. some parsed article cards lacked a required title or URL. The library refuses to return a partial result set to keep output trustworthy. This indicates the extraction found DOM nodes matching the card selector whose fields could not be populated — usually a page-structure drift or ad/promo cards with different markup.","triggerScenarios":"Sogou mixes ad cards or non-article cards into the result list whose selectors don't yield title/url; partial DOM changes break field extraction for some cards; lazy-loaded content not rendered when evaluate ran.","commonSituations":"Sponsored results appearing on the first page of a popular keyword; Sogou testing a new card layout for a subset of results; slow connections where images/lazy fields haven't populated.","solutions":["Retry — if transient (slow rendering), a second attempt often parses cleanly","Upgrade the CLI so its selectors handle the new card variants","Try a different page number (e.g. page 2) where ad cards are less common","Report the failing page markup to the maintainers if it persists"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { rows = await weixinSearch(q); }\ncatch (e) { if (String(e.message).includes('without required title')) return retryOnceWithDifferentPage(); throw e; }","preventionTips":["Retry once before failing — often transient rendering","Try page 2+ where ad cards are rarer","Keep CLI updated for new card layouts"],"tags":["scraping","page-structure","data-integrity"],"backgroundTag":"unexpected-response-schema","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}