{"record":{"id":"d9c030373bd7e97f","repo":"ytdl-org/youtube-dl","slug":"this-song-has-been-offline-because-of-copyright-is","errorCode":null,"errorMessage":"this song has been offline because of copyright issues","messagePattern":"this song has been offline because of copyright issues","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/kuwo.py","lineNumber":98,"sourceCode":"            'description': 'md5:5d0e947b242c35dc0eb1d2fce9fbf02c',\n            'creator': 'IU',\n            'upload_date': '20150518',\n        },\n        'params': {\n            'format': 'mp3-320',\n        },\n    }, {\n        'url': 'http://www.kuwo.cn/yinyue/3197154?catalog=yueku2016',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        song_id = self._match_id(url)\n        webpage, urlh = self._download_webpage_handle(\n            url, song_id, note='Download song detail info',\n            errnote='Unable to get song detail info')\n        if song_id not in urlh.geturl() or '对不起，该歌曲由于版权问题已被下线，将返回网站首页' in webpage:\n            raise ExtractorError('this song has been offline because of copyright issues', expected=True)\n\n        song_name = self._html_search_regex(\n            r'<p[^>]+id=\"lrcName\">([^<]+)</p>', webpage, 'song name')\n        singer_name = remove_start(self._html_search_regex(\n            r'<a[^>]+href=\"http://www\\.kuwo\\.cn/artist/content\\?name=([^\"]+)\">',\n            webpage, 'singer name', fatal=False), '歌手')\n        lrc_content = clean_html(get_element_by_id('lrcContent', webpage))\n        if lrc_content == '暂无':     # indicates no lyrics\n            lrc_content = None\n\n        formats = self._get_formats(song_id)\n        self._sort_formats(formats)\n\n        album_id = self._html_search_regex(\n            r'<a[^>]+href=\"http://www\\.kuwo\\.cn/album/(\\d+)/\"',\n            webpage, 'album id', fatal=False)\n\n        publish_time = None","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/kuwo.py#L80-L116","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Search Kuwo for the same song under a new id (re-uploads get fresh ids) and use that URL","Find the track on another licensed platform","Confirm the song id is correct — a mistyped id also redirects off the song page","If you archived the audio previously, restore from your archive; the source copy is gone"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'offline because of copyright' in str(e):\n        search_for_reupload(song_id)  # permanent takedown, do not retry\n    else:\n        raise","preventionTips":["Treat as permanent: takedowns rarely reverse; blacklist the id","Archive audio at acquisition time rather than relying on deferred downloads"],"tags":["kuwo","copyright-takedown","extractor","redirect"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}