From: Sergey M․ Date: Tue, 22 Sep 2015 15:50:20 +0000 (+0600) Subject: [extractor/common] Add raise_geo_restricted X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c430802e32932868e24a6e43d0845df963320829;p=youtube-dl [extractor/common] Add raise_geo_restricted --- diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index d694e818e..1e7db8a9b 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -516,6 +516,12 @@ class InfoExtractor(object): '%s. Use --username and --password or --netrc to provide account credentials.' % msg, expected=True) + @staticmethod + def raise_geo_restricted(msg='This video is not available from your location due to geo restriction'): + raise ExtractorError( + '%s. You might want to use --proxy to workaround.' % msg, + expected=True) + # Methods for following #608 @staticmethod def url_result(url, ie=None, video_id=None, video_title=None):