iawia002/lux · error

empty list

Error message

empty list

What it means

The UDN extractor calls getCDNUrl(html) to locate the CDN media URL inside the article page; if it returns an empty string, the error 'empty list' is thrown (the message is misleading — it really means 'no CDN source URL found in the page'). Without the CDN URL the extractor cannot build the media request.

Source

Thrown at extractors/udn/udn.go:71

	if len(url) == 0 {
		return nil, errors.WithStack(extractors.ErrURLParseFailed)
	}

	html, err := request.Get(url, url, nil)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	var title string
	desc := utils.MatchOneOf(html, `title: '(.+?)',
        link:`)
	if len(desc) > 1 {
		title = desc[1]
	} else {
		title = "udn"
	}
	cdnURL := getCDNUrl(html)
	if cdnURL == "" {
		return nil, errors.New("empty list")
	}
	srcURL, err := request.Get("http://"+cdnURL, url, nil)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	size, err := request.Size(srcURL, url)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	urlData := &extractors.Part{
		URL:  srcURL,
		Size: size,
		Ext:  "mp4",
	}
	quality := "normal"
	streams := map[string]*extractors.Stream{
		quality: {
			Parts:   []*extractors.Part{urlData},

View on GitHub (pinned to dd00f6d258)

Solutions

  1. Verify the article URL in a browser and confirm it contains a playable video
  2. Fetch the HTML the extractor sees and check whether the CDN URL pattern is present at all
  3. Update the pattern inside getCDNUrl in extractors/udn/udn.go to match UDN's current markup
  4. Filter input URLs to video articles only before batch extraction

Example fix

// before
cdnURL := getCDNUrl(html)
if cdnURL == "" {
    return nil, errors.New("empty list")
}

// after (clearer diagnostic, same failure point)
cdnURL := getCDNUrl(html)
if cdnURL == "" {
    return nil, errors.New("udn: no CDN media URL found in page (video missing, gated, or markup changed)")
}
Defensive patterns

Strategy: try-catch

Try / catch

_, err := udn.Extract(url, opts)
if err != nil && strings.Contains(err.Error(), "empty list") {
    // page had no CDN media URL: not a video article or markup changed; skip
}

Prevention

When it happens

Trigger: Calling Extract on a UDN article whose HTML no longer contains the pattern getCDNUrl looks for (site redesign), an article with no video at all, or a region/subscription-gated page that serves different markup to the extractor.

Common situations: UDN (Taiwan news) changes its player markup; the URL points to a photo/text-only article; anti-bot or geo page served to non-Taiwan IPs lacks the player markup.

Related errors


AI-assisted analysis of iawia002/lux@dd00f6d258 (2026-08-15). Data as JSON: /api/errors/b35010c4b6c6179d. Report an issue: GitHub.