{"record":{"id":"b0d06f47fe5556f0","repo":"iawia002/lux","slug":"errurlqueryparamsparsefailed","errorCode":"ErrURLQueryParamsParseFailed","errorMessage":"url query params parse failed","messagePattern":"url query params parse failed","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"extractors/errors.go","lineNumber":11,"sourceCode":"package extractors\n\nimport (\n\t\"errors\"\n)\n\nvar (\n\t// ErrURLParseFailed defines url parse failed error.\n\tErrURLParseFailed            = errors.New(\"url parse failed\")\n\tErrInvalidRegularExpression  = errors.New(\"invalid regular expression\")\n\tErrURLQueryParamsParseFailed = errors.New(\"url query params parse failed\")\n\tErrBodyParseFailed           = errors.New(\"body parse failed\")\n)\n","sourceCodeStart":1,"sourceCodeEnd":14,"githubUrl":"https://github.com/iawia002/lux/blob/dd00f6d258d80b6684a0b9402d7124e5c18ef42f/extractors/errors.go#L1-L14","documentation":"Sentinel meaning 'url query params parse failed'. Two throw sites exist: douyin.go:76, when neturl.Parse of the constructed aweme-detail API URL fails (effectively unreachable with the current hardcoded string), and rumble.go:107, when the page's application/ld+json script block cannot be matched — there the name is misleading, since it is actually a body-parse failure.","triggerScenarios":"Rumble: the video page has no script[type=application/ld+json] payload — template change, anti-bot page, or removed video. Douyin: only if the API URL string construction is broken by a code edit.","commonSituations":"Rumble template changes; scraping from blocked IPs; douyin string-building edits that break URL validity.","solutions":["For rumble, inspect the fetched page for a script[type=application/ld+json] block; if absent, update the readPayload regex.","For douyin, log the constructed api string and confirm it is a valid absolute URL.","Retry from a different IP or with a cookie if an anti-bot page was served."],"exampleFix":"// before\nmatchPayload := utils.MatchOneOf(html, `\\<script\\stype=?\"application\\/ld\\+json\"?\\>(.+?)\\<\\/script>`)\n// after — simpler matcher, same semantics\nmatchPayload := utils.MatchOneOf(html, `<script[^>]*type=\"application/ld\\+json\"[^>]*>(.+?)</script>`)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"func isQueryParamsParseFailed(err error) bool {\n\treturn errors.Is(err, extractors.ErrURLQueryParamsParseFailed)\n}","tryCatchPattern":"Check with errors.Is; on rumble it almost always means the ld+json payload was missing from the page — retry once with a different session/IP, then dump the HTML for regex updating. On douyin it indicates a broken internal URL string, which is a code bug to report.","preventionTips":["For rumble, confirm the page contains script[type=application/ld+json] before scaling","Treat this sentinel from douyin as a maintenance defect rather than an input error","Log the failing page HTML alongside the error to speed regex fixes"],"tags":["rumble","douyin","sentinel-error","html-parsing","json-ld"],"backgroundTag":null,"analyzedSha":"dd00f6d258d80b6684a0b9402d7124e5c18ef42f","analyzedAt":"2026-08-15T16:57:31.080Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}