{"record":{"id":"5982735a63d87a8e","repo":"soimort/you-get","slug":"cannot-get-play-url","errorCode":null,"errorMessage":"Cannot_Get_Play_URL","messagePattern":"Cannot_Get_Play_URL","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/you_get/extractors/interest.py","lineNumber":18,"sourceCode":"#!/usr/bin/env python\n\nfrom ..common import *\nfrom json import loads\n\ndef interest_download(url, output_dir='.', merge=True, info_only=False, **kwargs):\n    #http://ch.interest.me/zhtv/VOD/View/114789\n    #http://program.interest.me/zhtv/sonja/8/Vod/View/15794\n    html = get_content(url)\n    #get title\n    title = match1(html, r'<meta property=\"og:title\" content=\"([^\"]*)\"')\n    title = title.split('&')[0].strip()\n    info_url = match1(html, r'data: \"(.+)\",')\n    play_info = loads(get_content(info_url))\n    try:\n        serverurl = play_info['data']['cdn']['serverurl']\n    except KeyError:\n        raise ValueError('Cannot_Get_Play_URL')\n    except:\n        raise ValueError('Cannot_Get_Play_URL')\n    # I cannot find any example of \"fileurl\", so i just put it like this for now\n    assert serverurl\n\n    type, ext, size = 'mp4', 'mp4', 0\n\n    print_info(site_info, title, type, size)\n    if not info_only:\n        download_rtmp_url(url=serverurl, title=title, ext=ext, output_dir=output_dir)\n\nsite_info = \"interest.me\"\ndownload = interest_download\ndownload_playlist = playlist_not_supported('interest')\n","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/soimort/you-get/blob/049548f3f3f35e67ba8d3181c71fdc71d11cf260/src/you_get/extractors/interest.py#L1-L33","documentation":"Raised as ValueError in interest_download (src/you_get/extractors/interest.py:18) from the KeyError handler. After loading the play-info JSON from the data URL scraped off the page, the expected key path data['data']['cdn']['serverurl'] is missing, so no RTMP play URL can be obtained.","triggerScenarios":"interest_download on a ch.interest.me / program.interest.me VOD page whose play-info JSON lacks the data.cdn.serverurl key — e.g. the JSON structure changed, the CDN fields were renamed, or geo/content restrictions return a reduced JSON.","commonSituations":"Site JSON schema drift; DRM/geo-blocked content that omits cdn info; pages where the scraped data: \"...\" URL returns an error payload instead of play info.","solutions":["Log play_info (the parsed JSON) to see which keys are actually present for your URL.","Try a different episode/URL to distinguish content-specific restriction from a schema change.","If the schema moved, update the key path in interest_download or upgrade you-get."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"def interest_play_info_has_serverurl(play_info):\n    if not isinstance(play_info, dict):\n        return False\n    data = play_info.get('data')\n    cdn = data.get('cdn') if isinstance(data, dict) else None\n    return isinstance(cdn, dict) and bool(cdn.get('serverurl'))","typeGuard":null,"tryCatchPattern":"try:\n    interest_download(url, output_dir)\nexcept ValueError as e:\n    if str(e) == 'Cannot_Get_Play_URL':\n        log_play_info_json(url)  # inspect schema before deciding retry vs fix\n    else:\n        raise","preventionTips":["Validate the JSON key path data.cdn.serverurl exists before handing off to the downloader.","Treat missing cdn info as content unavailability (geo/DRM) until proven otherwise."],"tags":["you-get","interest-me","api-error","key-error","extractor"],"backgroundTag":null,"analyzedSha":"049548f3f3f35e67ba8d3181c71fdc71d11cf260","analyzedAt":"2026-08-15T03:58:15.069Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}