soimort/you-get · error · NotImplementedError

Cannot find item ID

Error message

Cannot find item ID

What it means

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.

Source

Thrown at src/you_get/extractors/veoh.py:14

#!/usr/bin/env python

__all__ = ['veoh_download']

from ..common import *

def veoh_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):
    '''Get item_id'''
    if re.match(r'http://www.veoh.com/watch/\w+', url):
        item_id = match1(url, r'http://www.veoh.com/watch/(\w+)')
    elif re.match(r'http://www.veoh.com/m/watch.php\?v=\.*', url):
        item_id = match1(url, r'http://www.veoh.com/m/watch.php\?v=(\w+)')
    else:
        raise NotImplementedError('Cannot find item ID')
    veoh_download_by_id(item_id, output_dir = '.', merge = False, info_only = info_only, **kwargs)

#----------------------------------------------------------------------
def veoh_download_by_id(item_id, output_dir = '.', merge = False, info_only = False, **kwargs):
    """Source: Android mobile"""
    webpage_url = 'http://www.veoh.com/m/watch.php?v={item_id}&quality=1'.format(item_id = item_id)

    #grab download URL
    a = get_content(webpage_url, decoded=True)
    url = match1(a, r'<source src="(.*?)\"\W')

    #grab title
    title = match1(a, r'<meta property="og:title" content="([^"]*)"')

    type_, ext, size = url_info(url)
    print_info(site_info, title, type_, size)
    if not info_only:
        download_urls([url], title, ext, total_size=None, output_dir=output_dir, merge=merge)

View on GitHub (pinned to 049548f3f3)

Solutions

  1. Normalize the URL to exactly http://www.veoh.com/watch/<id> before calling (strip https -> http, ensure www.)
  2. 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+'
  3. If the page is not a watch page at all, find the canonical watch URL first (e.g. from the page's og:url)

Example fix

# before
if re.match(r'http://www.veoh.com/watch/\w+', url):
    item_id = match1(url, r'http://www.veoh.com/watch/(\w+)')
elif re.match(r'http://www.veoh.com/m/watch\.php\?v=\.*', url):
    item_id = match1(url, r'http://www.veoh.com/m/watch\.php\?v=(\w+)')
else:
    raise NotImplementedError('Cannot find item ID')

# after
if re.match(r'https?://(?:www\.)?veoh\.com/watch/\w+', url):
    item_id = match1(url, r'veoh\.com/watch/(\w+)')
elif re.match(r'https?://(?:www\.)?veoh\.com/m/watch\.php\?v=\w+', url):
    item_id = match1(url, r'm/watch\.php\?v=(\w+)')
else:
    raise NotImplementedError('Cannot find item ID')
Defensive patterns

Strategy: validation

Validate before calling

import re

def veoh_url_supported(url):
    return re.match(r'https?://(?:www\.)?veoh\.com/(?:m/)?watch', url) is not None

Try / catch

try:
    veoh_download(url, ...)
except NotImplementedError:
    print('normalize to http://www.veoh.com/watch/<id> and retry')

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15). Data as JSON: /api/errors/7f0f0b5fe3886e44. Report an issue: GitHub.