{"record":{"id":"cd9203a3c9598968","repo":"tonhowtf/omniget","slug":"animacao-do-x-nao-encontrada-na-pagina","errorCode":null,"errorMessage":"animacao do X nao encontrada na pagina","messagePattern":"animacao do X nao encontrada na pagina","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/x/txid.rs","lineNumber":230,"sourceCode":"    let re_g = regex::Regex::new(r#\"(?s)<g[^>]*>(.*?)</g>\"#).unwrap();\n    let re_path = regex::Regex::new(r#\"<path[^>]*\\sd=\"([^\"]+)\"\"#).unwrap();\n    let mut ds: Vec<String> = Vec::new();\n    for svg in re_svg.captures_iter(html) {\n        let inner = &svg[1];\n        let g = re_g\n            .captures(inner)\n            .map(|c| c[1].to_string())\n            .unwrap_or_else(|| inner.to_string());\n        let paths: Vec<String> = re_path\n            .captures_iter(&g)\n            .map(|c| c[1].trim().to_string())\n            .collect();\n        if let Some(d) = paths.get(1) {\n            ds.push(d.clone());\n        }\n    }\n    if ds.is_empty() {\n        anyhow::bail!(\"animacao do X nao encontrada na pagina\");\n    }\n    let idx = (vk.get(5).copied().unwrap_or(0) as usize) % ds.len();\n    let d = &ds[idx];\n    let body: String = d.chars().skip(9).collect();\n    let re_num = regex::Regex::new(r\"[^\\d]+\").unwrap();\n    let mut rows = Vec::new();\n    for part in body.split('C') {\n        let nums: Vec<f64> = re_num\n            .replace_all(part, \" \")\n            .split_whitespace()\n            .filter_map(|x| x.parse().ok())\n            .collect();\n        rows.push(nums);\n    }\n    Ok(rows)\n}\n\nfn script_urls(html: &str) -> Vec<String> {","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/x/txid.rs#L212-L248","documentation":"anim_frames() extracts SVG path 'd' attributes from an animation page on X to derive an animation key; it bails if no candidate paths were found. The txid generation depends on parsing this animation data from the served page.","triggerScenarios":"Calling create() -> anim_frames() when the fetched page contains no parseable animation SVG paths — the page HTML differs from what the extractor expects (challenge page, logged-out page, or markup change).","commonSituations":"X redesign of the txid animation markup; page fetch returned an error/blocked response; logged-out session served different content.","solutions":["Ensure a logged-in session is used so X serves the page with animation data.","Dump the HTML and update the path-extraction selectors for current markup.","Retry after checking the page request actually returned 200 with full content."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match TxIdGen::create(...).await {\n    Ok(gen) => gen,\n    Err(e) if e.to_string().contains(\"animacao do X nao encontrada\") => {\n        // refetch page once, then surface a clear 'session/page changed' error\n        retry_once().await?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always use an authenticated session when generating txids.","Log page HTML on failure so markup changes are caught quickly.","Cache a working TxIdGen briefly instead of rebuilding per request."],"tags":["scraping","parsing","html"],"backgroundTag":"resource-not-found","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}