iawia002/lux · error

Invalid video URL: Missing video ID parameter

Error message

Invalid video URL: Missing video ID parameter

What it means

The bitchute extractor builds the beta9 embed URL from the video id captured by the URL-path regex /video/([^?/]+). This error is thrown before any network call when the URL contains no /video/<id> segment, so no embed request can be constructed.

Source

Thrown at extractors/bitchute/bitchute.go:34

)

func init() {
	extractors.Register("bitchute", New())
}

type extractor struct{}

// New returns a bitchute extractor.
func New() extractors.Extractor {
	return &extractor{}
}

// Extract is the main function to extract the data.
func (e *extractor) Extract(u string, option extractors.Options) ([]*extractors.Data, error) {
	regVideoID := regexp.MustCompile(`/video/([^?/]+)`)
	matchVideoID := regVideoID.FindStringSubmatch(u)
	if len(matchVideoID) < 2 {
		return nil, errors.New("Invalid video URL: Missing video ID parameter")
	}
	embedURL := fmt.Sprintf("https://www.bitchute.com/api/beta9/embed/?videoID=%s", matchVideoID[1])

	res, err := request.Request(http.MethodGet, embedURL, nil, nil)
	if err != nil {
		return nil, errors.WithStack(err)
	}
	defer res.Body.Close() // nolint

	var reader io.ReadCloser
	switch res.Header.Get("Content-Encoding") {
	case "gzip":
		reader, _ = gzip.NewReader(res.Body)
	case "deflate":
		reader = flate.NewReader(res.Body)
	default:
		reader = res.Body
	}

View on GitHub (pinned to dd00f6d258)

Solutions

  1. Use the canonical video URL form https://www.bitchute.com/video/<ID>/.
  2. If you only have a channel URL, resolve it to concrete video page URLs first, then extract each one.

Example fix

// before
$ lux "https://www.bitchute.com/channel/somechannel/"
// after
$ lux "https://www.bitchute.com/video/xyz123/"
Defensive patterns

Strategy: validation

Validate before calling

var bitchuteVideoRe = regexp.MustCompile(`/video/([^?/]+)`)
if bitchuteVideoRe.FindStringSubmatch(u) == nil {
	return fmt.Errorf("not a bitchute video URL (need /video/<id>): %s", u)
}

Type guard

func isBitChuteVideoURL(u string) bool {
	return regexp.MustCompile(`/video/[^?/]+`).MatchString(u)
}

Prevention

When it happens

Trigger: Passing a channel URL (bitchute.com/channel/<name>), the homepage, or a search URL instead of a specific video page URL.

Common situations: Copy-pasting a channel share link instead of a video link; scripts iterating a channel feed and feeding channel URLs to the extractor.

Related errors


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