diff options
author | Remita Amine <remitamine@gmail.com> | 2017-02-23 11:49:35 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-02-23 11:56:55 +0100 |
commit | c59f7036101b5349b3b02a8bd700eff507012e3f (patch) | |
tree | c7fc3b8fc9dd7f1ffa594ab26b9bfd501a596154 /youtube_dl/extractor/sohu.py | |
parent | bc61c80c143d8faed3e264c2487204924acd1eb6 (diff) | |
download | youtube-dl-c59f7036101b5349b3b02a8bd700eff507012e3f.zip youtube-dl-c59f7036101b5349b3b02a8bd700eff507012e3f.tar.gz youtube-dl-c59f7036101b5349b3b02a8bd700eff507012e3f.tar.bz2 |
[sohu] raise GeoRestrictedError
Diffstat (limited to 'youtube_dl/extractor/sohu.py')
-rw-r--r-- | youtube_dl/extractor/sohu.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py index 30760ca..7da12ce 100644 --- a/youtube_dl/extractor/sohu.py +++ b/youtube_dl/extractor/sohu.py @@ -108,12 +108,11 @@ class SohuIE(InfoExtractor): if vid_data['play'] != 1: if vid_data.get('status') == 12: raise ExtractorError( - 'Sohu said: There\'s something wrong in the video.', + '%s said: There\'s something wrong in the video.' % self.IE_NAME, expected=True) else: - raise ExtractorError( - 'Sohu said: The video is only licensed to users in Mainland China.', - expected=True) + self.raise_geo_restricted( + '%s said: The video is only licensed to users in Mainland China.' % self.IE_NAME) formats_json = {} for format_id in ('nor', 'high', 'super', 'ori', 'h2644k', 'h2654k'): |