{"record":{"id":"55af5e934c067edb","repo":"tonhowtf/omniget","slug":"tiktok-is-blocking-requests-try-again-in-a-few-minutes-mod","errorCode":null,"errorMessage":"TikTok is blocking requests. Try again in a few minutes.","messagePattern":"TikTok is blocking requests\\. Try again in a few minutes\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/src/platforms/tiktok/mod.rs","lineNumber":159,"sourceCode":"        let status = response.status();\n\n        if !status.is_success() && status.as_u16() != 302 {\n            return Err(anyhow!(\"TikTok retornou HTTP {}\", status));\n        }\n\n        let mut cookie_parts = Vec::new();\n        for cookie in response.cookies() {\n            cookie_parts.push(format!(\"{}={}\", cookie.name(), cookie.value()));\n        }\n        if !cookie_parts.is_empty() {\n            let cookie_str = cookie_parts.join(\"; \");\n            *self.captured_cookies.lock().await = Some(cookie_str);\n        }\n\n        let html = response.text().await?;\n\n        if Self::is_captcha_page(&html) {\n            return Err(anyhow!(\n                \"TikTok is blocking requests. Try again in a few minutes.\"\n            ));\n        }\n\n        let json_str = html\n            .split(\"<script id=\\\"__UNIVERSAL_DATA_FOR_REHYDRATION__\\\" type=\\\"application/json\\\">\")\n            .nth(1)\n            .and_then(|s| s.split(\"</script>\").next())\n            .ok_or_else(|| anyhow!(\"TikTok is blocking requests. Try again in a few minutes.\"))?;\n\n        let data: serde_json::Value = serde_json::from_str(json_str)\n            .map_err(|_| anyhow!(\"Erro ao processar resposta do TikTok\"))?;\n\n        let video_detail = data\n            .get(\"__DEFAULT_SCOPE__\")\n            .and_then(|s| s.get(\"webapp.video-detail\"))\n            .ok_or_else(|| anyhow!(\"Video data not found in TikTok response\"))?;\n","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/tiktok/mod.rs#L141-L177","documentation":"After fetching the detail page, the HTML is checked with is_captcha_page; if TikTok served a captcha/bot-verification page, fetch_detail aborts with this error. It means TikTok is blocking the scraper rather than returning video data.","triggerScenarios":"The response HTML contains markers like 'verify-bar-close', 'captcha_verify', or 'tiktok-verify-page' — i.e. a challenge page was returned instead of video content.","commonSituations":"High request volume from one IP, missing or stale cookies, datacenter IPs flagged by TikTok, or requests without realistic browser headers.","solutions":["Wait a few minutes and retry with lower request frequency","Persist and reuse cookies captured from a successful request (captured_cookies)","Route requests through residential/proxy IPs or vary the User-Agent","Prefer official TikTok APIs/oEmbed where possible"],"exampleFix":"// caller-side\nmatch fetcher.fetch_detail(&url).await {\n    Err(e) if e.to_string().contains(\"blocking requests\") => {\n        tokio::time::sleep(Duration::from_secs(120)).await;\n        retry_with_new_session()\n    }\n    other => other,\n}","handlingStrategy":"retry","validationCode":"let html = client.get(url).send().await?.text().await?;\nif TikTokClient::is_captcha_page(&html) {\n    return Err(\"captcha detected; back off before retry\".into());\n}","typeGuard":null,"tryCatchPattern":"match fetch_detail(url).await {\n    Err(e) if e.to_string().contains(\"blocking requests\") => {\n        sleep(Duration::from_secs(120)).await;\n        fetch_detail_with_new_session(url).await\n    }\n    other => other,\n}","preventionTips":["Rate-limit all TikTok requests","Rotate sessions/proxies and User-Agents","Persist cookies from successful responses and reuse them"],"tags":["tiktok","captcha","rate-limit","bot-detection"],"backgroundTag":"rate-limit-exceeded","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"}