{"record":{"id":"e2501a7f42f558eb","repo":"iawia002/lux","slug":"invalid-video-url-missing-video-id-parameter","errorCode":null,"errorMessage":"Invalid video URL: Missing video ID parameter","messagePattern":"Invalid video URL: Missing video ID parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extractors/bitchute/bitchute.go","lineNumber":34,"sourceCode":")\n\nfunc init() {\n\textractors.Register(\"bitchute\", New())\n}\n\ntype extractor struct{}\n\n// New returns a bitchute extractor.\nfunc New() extractors.Extractor {\n\treturn &extractor{}\n}\n\n// Extract is the main function to extract the data.\nfunc (e *extractor) Extract(u string, option extractors.Options) ([]*extractors.Data, error) {\n\tregVideoID := regexp.MustCompile(`/video/([^?/]+)`)\n\tmatchVideoID := regVideoID.FindStringSubmatch(u)\n\tif len(matchVideoID) < 2 {\n\t\treturn nil, errors.New(\"Invalid video URL: Missing video ID parameter\")\n\t}\n\tembedURL := fmt.Sprintf(\"https://www.bitchute.com/api/beta9/embed/?videoID=%s\", matchVideoID[1])\n\n\tres, err := request.Request(http.MethodGet, embedURL, nil, nil)\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\tdefer res.Body.Close() // nolint\n\n\tvar reader io.ReadCloser\n\tswitch res.Header.Get(\"Content-Encoding\") {\n\tcase \"gzip\":\n\t\treader, _ = gzip.NewReader(res.Body)\n\tcase \"deflate\":\n\t\treader = flate.NewReader(res.Body)\n\tdefault:\n\t\treader = res.Body\n\t}","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/iawia002/lux/blob/dd00f6d258d80b6684a0b9402d7124e5c18ef42f/extractors/bitchute/bitchute.go#L16-L52","documentation":"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.","triggerScenarios":"Passing a channel URL (bitchute.com/channel/<name>), the homepage, or a search URL instead of a specific video page URL.","commonSituations":"Copy-pasting a channel share link instead of a video link; scripts iterating a channel feed and feeding channel URLs to the extractor.","solutions":["Use the canonical video URL form https://www.bitchute.com/video/<ID>/.","If you only have a channel URL, resolve it to concrete video page URLs first, then extract each one."],"exampleFix":"// before\n$ lux \"https://www.bitchute.com/channel/somechannel/\"\n// after\n$ lux \"https://www.bitchute.com/video/xyz123/\"","handlingStrategy":"validation","validationCode":"var bitchuteVideoRe = regexp.MustCompile(`/video/([^?/]+)`)\nif bitchuteVideoRe.FindStringSubmatch(u) == nil {\n\treturn fmt.Errorf(\"not a bitchute video URL (need /video/<id>): %s\", u)\n}","typeGuard":"func isBitChuteVideoURL(u string) bool {\n\treturn regexp.MustCompile(`/video/[^?/]+`).MatchString(u)\n}","tryCatchPattern":null,"preventionTips":["Validate the URL shape before enqueueing jobs into the extractor","Resolve channel pages to concrete video URLs in a separate step","Reject non-video links in pipeline input validation with a clear message"],"tags":["bitchute","url-validation","arguments"],"backgroundTag":null,"analyzedSha":"dd00f6d258d80b6684a0b9402d7124e5c18ef42f","analyzedAt":"2026-08-15T16:57:31.080Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}