aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-09-15 00:56:15 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-09-15 00:56:15 +0800
commit961516bfd1f3b514859f03766d282824ba8a76f5 (patch)
tree7cd3431559eb3d9a1a26b70a72579b8aa38406a8 /youtube_dl/extractor
parent6db354a9f4c62c3cc47918adc13e1e4b63146c80 (diff)
[kwuo:song] Improve error detection (closes #10650)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/kuwo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/kuwo.py b/youtube_dl/extractor/kuwo.py
index 081af86f6..63e10125e 100644
--- a/youtube_dl/extractor/kuwo.py
+++ b/youtube_dl/extractor/kuwo.py
@@ -91,10 +91,10 @@ class KuwoIE(KuwoBaseIE):
def _real_extract(self, 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',
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)
song_name = self._html_search_regex(