soimort/you-get · error · ValueError
Wrong url or unsupported link ... {0}
Error message
Wrong url or unsupported link ... {0} What it means
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.
Source
Thrown at src/you_get/extractors/longzhu.py:70
content = get_content(json_url)
data = json.loads(content)
username = data['userName']
title = data['title']
title = str.format(username,':',title)
real_url = data['videoUrl']
if player:
print_info('Longzhu Video', title, 'm3u8', 0)
download_urls([real_url], title, 'm3u8', 0, output_dir, merge=merge)
else:
urls = general_m3u8_extractor(real_url)
print_info('Longzhu Video', title, 'm3u8', 0)
if not info_only:
download_urls(urls, title, 'ts', 0, output_dir=output_dir, merge=merge, **kwargs)
else:
raise ValueError('Wrong url or unsupported link ... {0}'.format(url))
site_info = 'longzhu.com'
download = longzhu_download
download_playlist = playlist_not_supported('longzhu')
View on GitHub (pinned to 049548f3f3)
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
Example fix
# before you_get 'http://www.longzhu.com/room/12345' # -> Wrong url or unsupported link # after you_get 'http://star.longzhu.com/12345' # live room branch you_get 'http://replay.longzhu.com/182308' # replay branch
Defensive patterns
Strategy: validation
Validate before calling
from urllib.parse import urlparse
def is_supported_longzhu(url):
host = urlparse(url).netloc
return host in ('star.longzhu.com', 'y.longzhu.com', 'replay.longzhu.com') Try / catch
try:
longzhu_download(url, ...)
except ValueError as e:
if 'unsupported link' in str(e):
print('use a star./y./replay.longzhu.com URL')
else:
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Nothing to download here
- The live stream is not online!
- not found book number: %s
- Cannot find item ID
- url
AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15).
Data as JSON: /api/errors/7c102625679e197c.
Report an issue: GitHub.