projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb4e421
)
[extractor/common] Add raise_geo_restricted
author
Sergey M․
<dstftw@gmail.com>
Tue, 22 Sep 2015 15:50:20 +0000
(21:50 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 22 Sep 2015 15:50:20 +0000
(21:50 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index d694e818e98dc29939118a6d9fccb8b942b03128..1e7db8a9baf2fb48b8cab0697ca0ada46f624aa7 100644
(file)
--- 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):