1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 02:01:50 +00:00

[kwuo:song] Improve error detection (closes #10650)

This commit is contained in:
Yen Chi Hsuan 2016-09-15 00:56:15 +08:00
parent 6db354a9f4
commit 961516bfd1
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
version <unreleased> version <unreleased>
Extractors Extractors
* [kwuo] Improve error detection (#10650)
* [bilibili] Fix extraction for specific videos (#10647) * [bilibili] Fix extraction for specific videos (#10647)
+ [nbc] Add support for NBC Olympics (#10361) + [nbc] Add support for NBC Olympics (#10361)

View file

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