tonhowtf/omniget · error

No video URL available

Error message

No video URL available

What it means

For MediaType::Video downloads, download() takes the first entry of info.available_qualities as the stream to fetch. This error is thrown when that list is empty, i.e., the MediaInfo was constructed without any downloadable video URL/quality entry.

Solutions

  1. Re-fetch media info (get_media_info) to repopulate available_qualities.
  2. Use the yt-dlp fallback info path if the native scraper returned no direct URLs.
  3. Check that the post is publicly accessible and not age-gated.
  4. Add a guard in get_media_info so MediaInfo is never returned with an empty available_qualities.

Example fix

// before
let quality = info.available_qualities.first()
    .ok_or_else(|| anyhow!("No video URL available"))?;
// after
if info.available_qualities.is_empty() {
    let info = self.get_media_info_via_ytdlp(&url, &post_id).await?;
}
let quality = info.available_qualities.first()
    .ok_or_else(|| anyhow!("No video URL available for this post"))?;
Defensive patterns

Strategy: validation

Validate before calling

// Guard before calling download
if info.media_type == MediaType::Video && info.available_qualities.is_empty() {
    eprintln!("no video qualities; re-fetch info or use yt-dlp");
}

Try / catch

match downloader.download(info, opts).await {
    Err(e) if e.to_string().contains("No video URL") => retry_with_ytdlp(url).await,
    other => other,
}

Prevention

When it happens

Trigger: Calling download() on a MediaInfo of type Video whose available_qualities vector is empty — typically when extract_video_url() returned None (no valid playAddr/downloadAddr/bitrate URL) yet info was still built, or the native parse produced no direct URL.

Common situations: Region-blocked or login-gated videos where playAddr is withheld; TikTok removing direct-URL fields; scraper succeeded structurally but all candidate URLs failed is_valid_play_addr.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/932035d3defd7045. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/platforms/tiktok/mod.rs:540

                    opts.concurrent_fragments,
                    false,
                    &[],
                    opts.audio_format.as_deref(),
                )
                .await;
            }
        }

        let cookies = self.captured_cookies.lock().await.clone();
        let mut headers = self.download_headers(&cookies);
        crate::core::http_client::inject_ua_header(&mut headers, opts.user_agent.as_deref());

        match info.media_type {
            MediaType::Video => {
                let quality = info
                    .available_qualities
                    .first()
                    .ok_or_else(|| anyhow!("No video URL available"))?;

                if quality.format == "tiktok_direct" {
                    let filename = format!("{}.mp4", sanitize_filename::sanitize(&info.title));
                    let output = opts.output_dir.join(&filename);

                    let result = direct_downloader::download_direct_with_headers(
                        &self.client,
                        &quality.url,
                        &output,
                        progress.clone(),
                        Some(headers),
                        Some(&opts.cancel_token),
                    )
                    .await;

                    match result {
                        Ok(bytes) => {
                            return Ok(DownloadResult {

View on GitHub (pinned to 8600b91f42)