{"record":{"id":"7c102625679e197c","repo":"soimort/you-get","slug":"wrong-url-or-unsupported-link-0","errorCode":null,"errorMessage":"Wrong url or unsupported link ... {0}","messagePattern":"Wrong url or unsupported link \\.\\.\\. (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/you_get/extractors/longzhu.py","lineNumber":70,"sourceCode":"        content = get_content(json_url)\n        data = json.loads(content)\n\n        username = data['userName']\n        title = data['title']\n        title = str.format(username,':',title)\n        real_url = data['videoUrl']\n\n        if player:\n            print_info('Longzhu Video', title, 'm3u8', 0)\n            download_urls([real_url], title, 'm3u8', 0, output_dir, merge=merge)\n        else:\n            urls = general_m3u8_extractor(real_url)\n            print_info('Longzhu Video', title, 'm3u8', 0)\n            if not info_only:\n                download_urls(urls, title, 'ts', 0, output_dir=output_dir, merge=merge, **kwargs)\n\n    else:\n        raise ValueError('Wrong url or unsupported link ... {0}'.format(url))\n\nsite_info = 'longzhu.com'\ndownload = longzhu_download\ndownload_playlist = playlist_not_supported('longzhu')\n","sourceCodeStart":52,"sourceCodeEnd":75,"githubUrl":"https://github.com/soimort/you-get/blob/049548f3f3f35e67ba8d3181c71fdc71d11cf260/src/you_get/extractors/longzhu.py#L52-L75","documentation":"Terminal else-branch of longzhu_download: the URL's host matched none of the supported Longzhu subdomains (star.longzhu.com, y.longzhu.com, replay.longzhu.com). you-get raises ValueError with the offending URL so the caller knows the link is routable to no extractor branch.","triggerScenarios":"Passing any Longzhu URL whose web_domain is not star./y./replay., e.g. 'http://www.longzhu.com/...', 'http://longzhu.com/...', or a malformed URL where url.split('/')[2] yields an unexpected host string.","commonSituations":"Copy-pasting the site root or a channel-listing page instead of a room/replay page; site introducing a new subdomain (e.g. mobile m.longzhu.com links) the extractor never learned; trailing slashes or query strings producing an unexpected domain token.","solutions":["Use the exact supported forms: http://star.longzhu.com/<domain>, http://y.longzhu.com/<domain>, or http://replay.longzhu.com/<videoId>","Open the page in a browser and copy the URL from the address bar once the video/replay is playing","If a legitimate new subdomain exists, add an elif branch for it before the else and raise"],"exampleFix":"# before\nyou_get 'http://www.longzhu.com/room/12345'  # -> Wrong url or unsupported link\n\n# after\nyou_get 'http://star.longzhu.com/12345'    # live room branch\nyou_get 'http://replay.longzhu.com/182308'  # replay branch","handlingStrategy":"validation","validationCode":"from urllib.parse import urlparse\n\ndef is_supported_longzhu(url):\n    host = urlparse(url).netloc\n    return host in ('star.longzhu.com', 'y.longzhu.com', 'replay.longzhu.com')","typeGuard":null,"tryCatchPattern":"try:\n    longzhu_download(url, ...)\nexcept ValueError as e:\n    if 'unsupported link' in str(e):\n        print('use a star./y./replay.longzhu.com URL')\n    else:\n        raise","preventionTips":["Validate the URL host against the three supported Longzhu subdomains before calling","Copy the URL only from the address bar while the room/replay is open","Automate routing with a host->extractor map instead of substring guesses"],"tags":["url-validation","longzhu","unsupported-link"],"backgroundTag":null,"analyzedSha":"049548f3f3f35e67ba8d3181c71fdc71d11cf260","analyzedAt":"2026-08-15T03:58:15.069Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}