From: Yen Chi Hsuan Date: Wed, 3 Feb 2016 17:26:25 +0000 (+0800) Subject: [kuwo] Check for georestriction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=58be922079a09bc56ff331864b094ba38beaf26e;p=youtube-dl [kuwo] Check for georestriction --- diff --git a/youtube_dl/extractor/kuwo.py b/youtube_dl/extractor/kuwo.py index 0c8ed5d07..f641edef8 100644 --- a/youtube_dl/extractor/kuwo.py +++ b/youtube_dl/extractor/kuwo.py @@ -31,6 +31,10 @@ class KuwoBaseIE(InfoExtractor): (file_format['ext'], file_format.get('br', ''), song_id), song_id, note='Download %s url info' % file_format['format'], ) + + if song_url == 'IPDeny': + raise ExtractorError('This song is blocked in this region', expected=True) + if song_url.startswith('http://') or song_url.startswith('https://'): formats.append({ 'url': song_url,