{"record":{"id":"a9175cd3b2d38327","repo":"tonhowtf/omniget","slug":"tiktok-is-blocking-requests-try-again-in-a-few-minutes","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":"error","filePath":"src-tauri/omniget-core/src/platforms/tiktok.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/omniget-core/src/platforms/tiktok.rs#L141-L177","documentation":"After storing captured cookies, fetch_detail reads the response body and checks Self::is_captcha_page(&html), which looks for captcha markers like 'verify-bar-close', 'captcha_verify', and 'tiktok-verify-page'. If any marker is present, TikTok served a challenge page instead of video data and the library raises this error telling the caller TikTok is blocking automated requests.","triggerScenarios":"get_media_info -> fetch_detail when TikTok's bot detection flags the request: suspicious IP reputation, missing/invalid cookies, unusual request rate, or a client fingerprint TikTok does not trust.","commonSituations":"Scraping from cloud/datacenter IPs; running many requests in quick succession without cookies; TikTok tightening its anti-bot measures; requests without a realistic browser User-Agent/headers.","solutions":["Wait several minutes before retrying (as the message says) — blocks are usually temporary","Capture and reuse real browser cookies (the code stores captured_cookies) and send a realistic browser User-Agent/headers","Egress via a residential proxy instead of a datacenter IP","Slow request rate and add jitter between requests"],"exampleFix":"null","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match tiktok.get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"blocking requests\") => {\n        sleep(Duration::from_secs(300)).await;\n        retry_with_fresh_cookies(url).await?;\n    }\n    other => other?,\n}","preventionTips":["Space out requests; avoid tight scraping loops","Seed requests with valid browser cookies and full browser header set","Use residential/mobile egress IPs instead of datacenter ones","Monitor for captcha markers proactively and back off immediately"],"tags":["tiktok","bot-detection","captcha","scraping"],"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"}