soimort/you-get · error · Exception
Unsupported url
Error message
Unsupported url
What it means
Raised as plain Exception in ku6_download (src/you_get/extractors/ku6.py:47). For new-style www.ku6.com detail pages, the code scrapes an inline `detailDataMap={...};` JS object from the HTML; if that regex finds nothing, the page shape is unrecognized and the URL is rejected before any video metadata can be read.
Source
Thrown at src/you_get/extractors/ku6.py:47
def ku6_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
id = None
if match1(url, r'http://baidu.ku6.com/watch/(.*)\.html') is not None:
id = baidu_ku6(url)
else:
patterns = [r'http://v.ku6.com/special/show_\d+/(.*)\.\.\.html',
r'http://v.ku6.com/show/(.*)\.\.\.html',
r'http://my.ku6.com/watch\?.*v=(.*)\.\..*']
id = r1_of(patterns, url)
if id is None:
# http://www.ku6.com/2017/detail-zt.html?vid=xvqTmvZrH8MNvErpvRxFn3
page = get_content(url)
meta = re.search(r'detailDataMap=(\{.+?\});', page)
if meta is not None:
meta = meta.group(1)
else:
raise Exception('Unsupported url')
vid = re.search(r'vid=([^&]+)', url)
if vid is not None:
vid = vid.group(1)
else:
raise Exception('Unsupported url')
this_meta = re.search('"?'+vid+r'"?:\{(.+?)\}', meta)
if this_meta is not None:
this_meta = this_meta.group(1)
title = re.search('title:"(.+?)"', this_meta).group(1)
video_url = re.search('playUrl:"(.+?)"', this_meta).group(1)
video_size = url_size(video_url)
print_info(site_info, title, 'mp4', video_size)
if not info_only:
download_urls([video_url], title, 'mp4', video_size, output_dir, merge=merge, **kwargs)
return
ku6_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only)
View on GitHub (pinned to 049548f3f3)
Solutions
- Open the URL in a browser and confirm the video page (with metadata) is actually served.
- curl the page with the same headers and grep for detailDataMap; if gone, the page became JS-rendered — the extractor needs updating (or use the v.ku6.com canonical URL form).
- Prefer canonical v.ku6.com/show/... URLs which use the id-based path instead of page scraping.
Defensive patterns
Strategy: try-catch
Validate before calling
import re
from you_get.common import get_content
def ku6_page_has_detail_map(url):
page = get_content(url)
return re.search(r'detailDataMap=(\{.+?\});', page) is not None, page Try / catch
try:
ku6_download(url, output_dir)
except Exception as e:
if str(e) == 'Unsupported url' and 'v.ku6.com' not in url:
ku6_download(canonicalize_to_v_ku6(url)) # or flag site redesign
else:
raise Prevention
- Prefer canonical v.ku6.com/show/... URLs (id-based) over scraped www.ku6.com pages.
- When this fires, curl the page and grep for detailDataMap before retrying.
When it happens
Trigger: Calling ku6_download with a ku6.com URL that (a) matches none of the v.ku6.com/my.ku6.com id patterns, and (b) whose fetched HTML does not contain r'detailDataMap=(\{.+?\});' — e.g. ku6 redesigned the page, serves a JS-rendered shell, or returns an error/geo-block page.
Common situations: ku6.com site redesign removing the inline detailDataMap; bot detection returning an empty shell; old dead links redirecting to the homepage.
Related errors
- Cannot find flashvars
- API returned fail
- Playlist is not supported for
- Share not found or canceled: %s
- Server returned an error: %s (Incorrect password?)
AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15).
Data as JSON: /api/errors/0259b4b49996a910.
Report an issue: GitHub.