{"record":{"id":"30c75fad60eca4cc","repo":"ytdl-org/youtube-dl","slug":"invalid-url-s-30c75f","errorCode":null,"errorMessage":"Invalid URL: %s","messagePattern":"Invalid URL: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/leeco.py","lineNumber":355,"sourceCode":"            url = b64decode(play_url['main_url'])\n            decoded_url = b64decode(url_basename(url))\n            formats.append({\n                'url': url,\n                'ext': determine_ext(decoded_url),\n                'format_id': str_or_none(play_url.get('vtype')),\n                'format_note': str_or_none(play_url.get('definition')),\n                'width': int_or_none(play_url.get('vwidth')),\n                'height': int_or_none(play_url.get('vheight')),\n            })\n\n        return formats\n\n    def _real_extract(self, url):\n        uu_mobj = re.search(r'uu=([\\w]+)', url)\n        vu_mobj = re.search(r'vu=([\\w]+)', url)\n\n        if not uu_mobj or not vu_mobj:\n            raise ExtractorError('Invalid URL: %s' % url, expected=True)\n\n        uu = uu_mobj.group(1)\n        vu = vu_mobj.group(1)\n        media_id = uu + '_' + vu\n\n        formats = self._get_formats('flash', uu, vu, media_id) + self._get_formats('html5', uu, vu, media_id)\n        self._sort_formats(formats)\n\n        return {\n            'id': media_id,\n            'title': 'Video %s' % media_id,\n            'formats': formats,\n        }\n","sourceCodeStart":337,"sourceCodeEnd":369,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/leeco.py#L337-L369","documentation":"Raised by the LeTvCloud extractor's _real_extract when the URL does not contain both uu= and vu= parameters, which are required to build the media_id and sign the API request. It is expected=True; the offending URL is echoed in the message.","triggerScenarios":"Passing a Letv Cloud URL that matched _VALID_URL but lacks the uu or vu query parameter — e.g. a bare player URL, a URL where parameters were stripped during copy/paste or HTML-unescape, or a mutated embed URL.","commonSituations":"Copying embed URLs without their query string; CMS transforms stripping unknown query params; URL-decoding mangling uu/vu (both must be [\\w]+ — any punctuation breaks the regex); hand-building Letv Cloud URLs from partial examples.","solutions":["Re-copy the full embed URL including the complete ?uu=...&vu=... query string","Ensure uu and vu values contain only word characters (letters, digits, underscore) — anything else fails the [\\w]+ match","URL-decode HTML-escaped ampersands (&amp; -> &) before passing the URL","Take the URL directly from the iframe src attribute on the embedding page"],"exampleFix":"# before\n# http://player.pstream.net/e/...  (missing query)\n\n# after\n# http://player.pstream.net/e/...?uu=abc123&vu=def456","handlingStrategy":"validation","validationCode":"import re\nfrom urllib.parse import urlparse, parse_qs\n\ndef letv_cloud_url_valid(url):\n    q = parse_qs(urlparse(url).query)\n    uu, vu = q.get('uu', [''])[0], q.get('vu', [''])[0]\n    return bool(re.fullmatch(r'\\w+', uu)) and bool(re.fullmatch(r'\\w+', vu))","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'Invalid URL:' in str(e):\n        re_fetch_embed_src(parent_page)  # URL lost its query string; recopy it\n    else:\n        raise","preventionTips":["Never strip query strings from Letv Cloud embed URLs","Unescape &amp; to & when copying URLs out of HTML source"],"tags":["letv-cloud","url-parsing","missing-params","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}