aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-22 21:50:20 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-22 21:50:20 +0600
commitc430802e32932868e24a6e43d0845df963320829 (patch)
tree25d5588ad75ee6c834dbf6d1634b0cce107140df /youtube_dl/extractor/common.py
parentcb4e421901ce5fe26b457c33c141267c5c18a237 (diff)
[extractor/common] Add raise_geo_restricted
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py6
1 files changed, 6 insertions, 0 deletions
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):