]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[kuwo] Check for georestriction
authorYen Chi Hsuan <yan12125@gmail.com>
Wed, 3 Feb 2016 17:26:25 +0000 (01:26 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Wed, 3 Feb 2016 17:26:25 +0000 (01:26 +0800)
youtube_dl/extractor/kuwo.py

index 0c8ed5d07258d463375c2848d2f93c79885bdaae..f641edef8ada91cf1a4b458f388f7f51ce56fb3f 100644 (file)
@@ -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,