ytdl-org/youtube-dl · error · ExtractorError

Unable to find song or singer names

Error message

Unable to find song or singer names

What it means

Raised by the Kuwo MV extractor when the MV detail page does not match the <h1 title=...><span title=...> pattern used to read the song and singer names. Unlike most errors here it is not expected=True, so youtube-dl treats it as an extractor failure (page layout changed) rather than a user error.

Source

Thrown at youtube_dl/extractor/kuwo.py:333

    _FORMATS = KuwoBaseIE._FORMATS + [
        {'format': 'mkv', 'ext': 'mkv', 'preference': 250},
        {'format': 'mp4', 'ext': 'mp4', 'preference': 200},
    ]

    def _real_extract(self, url):
        song_id = self._match_id(url)
        webpage = self._download_webpage(
            url, song_id, note='Download mv detail info: %s' % song_id,
            errnote='Unable to get mv detail info: %s' % song_id)

        mobj = re.search(
            r'<h1[^>]+title="(?P<song>[^"]+)">[^<]+<span[^>]+title="(?P<singer>[^"]+)"',
            webpage)
        if mobj:
            song_name = mobj.group('song')
            singer_name = mobj.group('singer')
        else:
            raise ExtractorError('Unable to find song or singer names')

        formats = self._get_formats(song_id, tolerate_ip_deny=True)

        mv_url = self._download_webpage(
            'http://www.kuwo.cn/yy/st/mvurl?rid=MUSIC_%s' % song_id,
            song_id, note='Download %s MV URL' % song_id)
        formats.append({
            'url': mv_url,
            'format_id': 'mv',
        })

        self._sort_formats(formats)

        return {
            'id': song_id,
            'title': song_name,
            'creator': singer_name,
            'formats': formats,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Update youtube-dl (or migrate to yt-dlp) so you have the current MV-page regex
  2. Open the MV URL in a browser, inspect the h1/heading markup, and verify the page actually renders song/singer data server-side
  3. If the page is now JS-rendered, extract the data from the underlying API the page calls and report the breakage upstream
  4. File an extractor issue with the failing URL so the regex gets updated
Defensive patterns

Strategy: try-catch

Validate before calling

import re

def kuwo_mv_names_present(page_html):
    return re.search(r'<h1[^>]+title="[^"]+">[^<]+<span[^>]+title="[^"]+"', page_html) is not None

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'song or singer names' in str(e):
        logger.warning('kuwo MV layout changed for %s', url)  # report upstream
    else:
        raise

Prevention

When it happens

Trigger: Downloading a kuwo.cn MV page (e.g. /mv/<id>) whose markup no longer contains an h1 element with a title attribute immediately followed by a span with a title attribute, so re.search returns None and the else branch raises.

Common situations: Kuwo shipping a redesigned MV page (class/attribute changes); MVs served by a newer SPA shell without server-rendered h1; regional A/B page variants; an old youtube-dl version whose regex predates a past layout change.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/daf6d2068efd425d. Report an issue: GitHub.