class KuwoIE(KuwoBaseIE):
+ _WORKING = False
IE_NAME = 'kuwo:song'
IE_DESC = '酷我音乐'
_VALID_URL = r'https?://(?:www\.)?kuwo\.cn/yinyue/(?P<id>\d+)'
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:
+ if song_id not in urlh.url or '对不起,该歌曲由于版权问题已被下线,将返回网站首页' in webpage:
raise ExtractorError('this song has been offline because of copyright issues', expected=True)
song_name = self._html_search_regex(
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+)/"',
class KuwoAlbumIE(InfoExtractor):
+ _WORKING = False
IE_NAME = 'kuwo:album'
IE_DESC = '酷我音乐 - 专辑'
_VALID_URL = r'https?://(?:www\.)?kuwo\.cn/album/(?P<id>\d+?)/'
class KuwoChartIE(InfoExtractor):
+ _WORKING = False
IE_NAME = 'kuwo:chart'
IE_DESC = '酷我音乐 - 排行榜'
_VALID_URL = r'https?://yinyue\.kuwo\.cn/billboard_(?P<id>[^.]+).htm'
class KuwoSingerIE(InfoExtractor):
+ _WORKING = False
IE_NAME = 'kuwo:singer'
IE_DESC = '酷我音乐 - 歌手'
_VALID_URL = r'https?://(?:www\.)?kuwo\.cn/mingxing/(?P<id>[^/]+)'
class KuwoCategoryIE(InfoExtractor):
+ _WORKING = False
IE_NAME = 'kuwo:category'
IE_DESC = '酷我音乐 - 分类'
_VALID_URL = r'https?://yinyue\.kuwo\.cn/yy/cinfo_(?P<id>\d+?).htm'
class KuwoMvIE(KuwoBaseIE):
+ _WORKING = False
IE_NAME = 'kuwo:mv'
IE_DESC = '酷我音乐 - MV'
_VALID_URL = r'https?://(?:www\.)?kuwo\.cn/mv/(?P<id>\d+?)/'
'format_id': 'mv',
})
- self._sort_formats(formats)
-
return {
'id': song_id,
'title': song_name,