{"record":{"id":"0259b4b49996a910","repo":"soimort/you-get","slug":"unsupported-url","errorCode":null,"errorMessage":"Unsupported url","messagePattern":"Unsupported url","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/you_get/extractors/ku6.py","lineNumber":47,"sourceCode":"def ku6_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):\n    id = None\n\n    if match1(url, r'http://baidu.ku6.com/watch/(.*)\\.html') is not None:\n        id = baidu_ku6(url)\n    else:\n        patterns = [r'http://v.ku6.com/special/show_\\d+/(.*)\\.\\.\\.html',\n                r'http://v.ku6.com/show/(.*)\\.\\.\\.html',\n                r'http://my.ku6.com/watch\\?.*v=(.*)\\.\\..*']\n        id = r1_of(patterns, url)\n\n    if id is None:\n        # http://www.ku6.com/2017/detail-zt.html?vid=xvqTmvZrH8MNvErpvRxFn3\n        page = get_content(url)\n        meta = re.search(r'detailDataMap=(\\{.+?\\});', page)\n        if meta is not None:\n            meta = meta.group(1)\n        else:\n            raise Exception('Unsupported url')\n        vid = re.search(r'vid=([^&]+)', url)\n        if vid is not None:\n            vid = vid.group(1)\n        else:\n            raise Exception('Unsupported url')\n        this_meta = re.search('\"?'+vid+r'\"?:\\{(.+?)\\}', meta)\n        if this_meta is not None:\n            this_meta = this_meta.group(1)\n            title = re.search('title:\"(.+?)\"', this_meta).group(1)\n            video_url = re.search('playUrl:\"(.+?)\"', this_meta).group(1)\n        video_size = url_size(video_url)\n        print_info(site_info, title, 'mp4', video_size)\n        if not info_only:\n            download_urls([video_url], title, 'mp4', video_size, output_dir, merge=merge, **kwargs)\n        return\n\n    ku6_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only)\n","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/soimort/you-get/blob/049548f3f3f35e67ba8d3181c71fdc71d11cf260/src/you_get/extractors/ku6.py#L29-L65","documentation":"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.","triggerScenarios":"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.","commonSituations":"ku6.com site redesign removing the inline detailDataMap; bot detection returning an empty shell; old dead links redirecting to the homepage.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import re\nfrom you_get.common import get_content\n\ndef ku6_page_has_detail_map(url):\n    page = get_content(url)\n    return re.search(r'detailDataMap=(\\{.+?\\});', page) is not None, page","typeGuard":null,"tryCatchPattern":"try:\n    ku6_download(url, output_dir)\nexcept Exception as e:\n    if str(e) == 'Unsupported url' and 'v.ku6.com' not in url:\n        ku6_download(canonicalize_to_v_ku6(url))  # or flag site redesign\n    else:\n        raise","preventionTips":["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."],"tags":["you-get","ku6","parse-error","site-change","extractor"],"backgroundTag":null,"analyzedSha":"049548f3f3f35e67ba8d3181c71fdc71d11cf260","analyzedAt":"2026-08-15T03:58:15.069Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}