{"record":{"id":"7f0f0b5fe3886e44","repo":"soimort/you-get","slug":"cannot-find-item-id","errorCode":null,"errorMessage":"Cannot find item ID","messagePattern":"Cannot find item ID","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"src/you_get/extractors/veoh.py","lineNumber":14,"sourceCode":"#!/usr/bin/env python\n\n__all__ = ['veoh_download']\n\nfrom ..common import *\n\ndef veoh_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):\n    '''Get item_id'''\n    if re.match(r'http://www.veoh.com/watch/\\w+', url):\n        item_id = match1(url, r'http://www.veoh.com/watch/(\\w+)')\n    elif re.match(r'http://www.veoh.com/m/watch.php\\?v=\\.*', url):\n        item_id = match1(url, r'http://www.veoh.com/m/watch.php\\?v=(\\w+)')\n    else:\n        raise NotImplementedError('Cannot find item ID')\n    veoh_download_by_id(item_id, output_dir = '.', merge = False, info_only = info_only, **kwargs)\n\n#----------------------------------------------------------------------\ndef veoh_download_by_id(item_id, output_dir = '.', merge = False, info_only = False, **kwargs):\n    \"\"\"Source: Android mobile\"\"\"\n    webpage_url = 'http://www.veoh.com/m/watch.php?v={item_id}&quality=1'.format(item_id = item_id)\n\n    #grab download URL\n    a = get_content(webpage_url, decoded=True)\n    url = match1(a, r'<source src=\"(.*?)\\\"\\W')\n\n    #grab title\n    title = match1(a, r'<meta property=\"og:title\" content=\"([^\"]*)\"')\n\n    type_, ext, size = url_info(url)\n    print_info(site_info, title, type_, size)\n    if not info_only:\n        download_urls([url], title, ext, total_size=None, output_dir=output_dir, merge=merge)","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/soimort/you-get/blob/049548f3f3f35e67ba8d3181c71fdc71d11cf260/src/you_get/extractors/veoh.py#L1-L32","documentation":"veoh_download recognizes only two exact URL shapes — http://www.veoh.com/watch/<word> and http://www.veoh.com/m/watch.php?v=<word> — and anything else falls into the else raising NotImplementedError('Cannot find item ID'). The patterns are anchored to plain http with www, so perfectly valid modern https or bare-domain links are rejected.","triggerScenarios":"Passing 'https://www.veoh.com/watch/xyz' (https fails re.match on 'http://...'), 'http://veoh.com/watch/xyz' (missing www), or any other Veoh page type (search, user profile) — all miss both regexes at src/you_get/extractors/veoh.py:11-14.","commonSituations":"Browsers and share buttons now default to https, so nearly every copied link hits this; users trimming 'www.' from URLs; links to Veoh's current URL forms after site redesigns.","solutions":["Normalize the URL to exactly http://www.veoh.com/watch/<id> before calling (strip https -> http, ensure www.)","Or patch the two regexes in src/you_get/extractors/veoh.py to r'https?://(?:www\\.)?veoh\\.com/watch/\\w+' and r'https?://(?:www\\.)?veoh\\.com/m/watch\\.php\\?v=\\w+'","If the page is not a watch page at all, find the canonical watch URL first (e.g. from the page's og:url)"],"exampleFix":"# before\nif re.match(r'http://www.veoh.com/watch/\\w+', url):\n    item_id = match1(url, r'http://www.veoh.com/watch/(\\w+)')\nelif re.match(r'http://www.veoh.com/m/watch\\.php\\?v=\\.*', url):\n    item_id = match1(url, r'http://www.veoh.com/m/watch\\.php\\?v=(\\w+)')\nelse:\n    raise NotImplementedError('Cannot find item ID')\n\n# after\nif re.match(r'https?://(?:www\\.)?veoh\\.com/watch/\\w+', url):\n    item_id = match1(url, r'veoh\\.com/watch/(\\w+)')\nelif re.match(r'https?://(?:www\\.)?veoh\\.com/m/watch\\.php\\?v=\\w+', url):\n    item_id = match1(url, r'm/watch\\.php\\?v=(\\w+)')\nelse:\n    raise NotImplementedError('Cannot find item ID')","handlingStrategy":"validation","validationCode":"import re\n\ndef veoh_url_supported(url):\n    return re.match(r'https?://(?:www\\.)?veoh\\.com/(?:m/)?watch', url) is not None","typeGuard":null,"tryCatchPattern":"try:\n    veoh_download(url, ...)\nexcept NotImplementedError:\n    print('normalize to http://www.veoh.com/watch/<id> and retry')","preventionTips":["Rewrite copied links to http://www.veoh.com/watch/<id> (the extractor only knows plain-http www URLs)","Strip tracking query strings that can break the trailing \\w+ match","Confirm the link is a watch page, not a search/profile page"],"tags":["veoh","url-validation","https","regex"],"backgroundTag":null,"analyzedSha":"049548f3f3f35e67ba8d3181c71fdc71d11cf260","analyzedAt":"2026-08-15T03:58:15.069Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}