ytdl-org/youtube-dl · error · ExtractorError

this song has been offline because of copyright issues

Error message

this song has been offline because of copyright issues

What it means

Raised by the Kuwo song extractor when the song detail request redirects away from the requested song id or the page contains the Chinese copyright-offline notice '该歌曲由于版权问题已被下线'. It is expected=True and means the track was pulled for copyright reasons, so no formats can be resolved.

Source

Thrown at youtube_dl/extractor/kuwo.py:98

            'description': 'md5:5d0e947b242c35dc0eb1d2fce9fbf02c',
            'creator': 'IU',
            'upload_date': '20150518',
        },
        'params': {
            'format': 'mp3-320',
        },
    }, {
        'url': 'http://www.kuwo.cn/yinyue/3197154?catalog=yueku2016',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        song_id = self._match_id(url)
        webpage, urlh = self._download_webpage_handle(
            url, song_id, note='Download song detail info',
            errnote='Unable to get song detail info')
        if song_id not in urlh.geturl() or '对不起,该歌曲由于版权问题已被下线,将返回网站首页' in webpage:
            raise ExtractorError('this song has been offline because of copyright issues', expected=True)

        song_name = self._html_search_regex(
            r'<p[^>]+id="lrcName">([^<]+)</p>', webpage, 'song name')
        singer_name = remove_start(self._html_search_regex(
            r'<a[^>]+href="http://www\.kuwo\.cn/artist/content\?name=([^"]+)">',
            webpage, 'singer name', fatal=False), '歌手')
        lrc_content = clean_html(get_element_by_id('lrcContent', webpage))
        if lrc_content == '暂无':     # indicates no lyrics
            lrc_content = None

        formats = self._get_formats(song_id)
        self._sort_formats(formats)

        album_id = self._html_search_regex(
            r'<a[^>]+href="http://www\.kuwo\.cn/album/(\d+)/"',
            webpage, 'album id', fatal=False)

        publish_time = None

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Search Kuwo for the same song under a new id (re-uploads get fresh ids) and use that URL
  2. Find the track on another licensed platform
  3. Confirm the song id is correct — a mistyped id also redirects off the song page
  4. If you archived the audio previously, restore from your archive; the source copy is gone
Defensive patterns

Strategy: try-catch

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'offline because of copyright' in str(e):
        search_for_reupload(song_id)  # permanent takedown, do not retry
    else:
        raise

Prevention

When it happens

Trigger: Downloading a kuwo.cn/yinyue/<song_id> URL where urlh.geturl() after the request no longer contains song_id (site redirected to home), or where the webpage includes the literal takedown message. Either condition short-circuits extraction before song-name parsing.

Common situations: Tracks removed after licensing disputes; deep links saved before a takedown that now bounce to the homepage; catalogue purges of older uploads; links shared from other regions where the takedown applies globally.

Related errors


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