about summary refs log tree commit diff
path: root/youtube_dl/options.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-05-02 07:18:01 +0700
committerSergey M․ <dstftw@gmail.com>2018-05-02 07:20:59 +0700
commit5f95927a62a533b9e616abb5f1481cedeaa16a4a (patch)
tree13e1cbddf07dd4259211ede5df0d2705604ca5b1 /youtube_dl/options.py
parenta93ce61bd5cbe7779e4eff0f8ab74a8a02211285 (diff)
downloadyoutube-dl-5f95927a62a533b9e616abb5f1481cedeaa16a4a.tar.gz
youtube-dl-5f95927a62a533b9e616abb5f1481cedeaa16a4a.tar.xz
youtube-dl-5f95927a62a533b9e616abb5f1481cedeaa16a4a.zip
Improve geo bypass mechanism
* Introduce geo bypass context
* Add ability to bypass based on IP blocks in CIDR notation
* Introduce --geo-bypass-ip-block
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r--youtube_dl/options.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 3e4ac03a2..f3f8f23b6 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -249,6 +249,10 @@ def parseOpts(overrideArguments=None):
         '--geo-bypass-country', metavar='CODE',
         dest='geo_bypass_country', default=None,
         help='Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code (experimental)')
+    geo.add_option(
+        '--geo-bypass-ip-block', metavar='IP_BLOCK',
+        dest='geo_bypass_ip_block', default=None,
+        help='Force bypass geographic restriction with explicitly provided IP block in CIDR notation (experimental)')
 
     selection = optparse.OptionGroup(parser, 'Video Selection')
     selection.add_option(