Add experimental geo restriction bypass mechanism
Based on faking X-Forwarded-For HTTP header
This commit is contained in:
parent
bf5b9d859a
commit
773f291dcb
5 changed files with 340 additions and 6 deletions
|
@ -549,6 +549,18 @@ def parseOpts(overrideArguments=None):
|
|||
'Upper bound of a range for randomized sleep before each download '
|
||||
'(maximum possible number of seconds to sleep). Must only be used '
|
||||
'along with --min-sleep-interval.'))
|
||||
workarounds.add_option(
|
||||
'--bypass-geo',
|
||||
action='store_true', dest='bypass_geo_restriction', default=True,
|
||||
help='Bypass geographic restriction via faking X-Forwarded-For HTTP header (experimental)')
|
||||
workarounds.add_option(
|
||||
'--no-bypass-geo',
|
||||
action='store_false', dest='bypass_geo_restriction', default=True,
|
||||
help='Do not bypass geographic restriction via faking X-Forwarded-For HTTP header (experimental)')
|
||||
workarounds.add_option(
|
||||
'--bypass-geo-as-country', metavar='CODE',
|
||||
dest='bypass_geo_restriction_as_country', default=None,
|
||||
help='Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code (experimental)')
|
||||
|
||||
verbosity = optparse.OptionGroup(parser, 'Verbosity / Simulation Options')
|
||||
verbosity.add_option(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue