tonhowtf/omniget · error
TikTok is blocking requests. Try again in a few minutes.
Error message
TikTok is blocking requests. Try again in a few minutes.
What it means
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.
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
Example fix
null
Defensive patterns
Strategy: retry
Try / catch
match tiktok.get_media_info(url).await {
Err(e) if e.to_string().contains("blocking requests") => {
sleep(Duration::from_secs(300)).await;
retry_with_fresh_cookies(url).await?;
}
other => other?,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- TikTok is blocking requests. Try again in a few minutes.
- não achei o secUid de @{} na página do perfil — a sessão pod
- a lista voltou vazia — o TikTok não entregou os favoritos pa
- Could not resolve short link
- TikTok retornou HTTP {}
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/a9175cd3b2d38327.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/tiktok.rs:159
let status = response.status();
if !status.is_success() && status.as_u16() != 302 {
return Err(anyhow!("TikTok retornou HTTP {}", status));
}
let mut cookie_parts = Vec::new();
for cookie in response.cookies() {
cookie_parts.push(format!("{}={}", cookie.name(), cookie.value()));
}
if !cookie_parts.is_empty() {
let cookie_str = cookie_parts.join("; ");
*self.captured_cookies.lock().await = Some(cookie_str);
}
let html = response.text().await?;
if Self::is_captcha_page(&html) {
return Err(anyhow!(
"TikTok is blocking requests. Try again in a few minutes."
));
}
let json_str = html
.split("<script id=\"__UNIVERSAL_DATA_FOR_REHYDRATION__\" type=\"application/json\">")
.nth(1)
.and_then(|s| s.split("</script>").next())
.ok_or_else(|| anyhow!("TikTok is blocking requests. Try again in a few minutes."))?;
let data: serde_json::Value = serde_json::from_str(json_str)
.map_err(|_| anyhow!("Erro ao processar resposta do TikTok"))?;
let video_detail = data
.get("__DEFAULT_SCOPE__")
.and_then(|s| s.get("webapp.video-detail"))
.ok_or_else(|| anyhow!("Video data not found in TikTok response"))?;
View on GitHub (pinned to 8600b91f42)