mirror of https://github.com/scrapy/scrapy.git
Update scrapy/utils/curl.py
Co-authored-by: Adrián Chaves <adrian@chaves.io>
This commit is contained in:
parent
7e1814faf8
commit
b7ecec1809
|
|
@ -10,8 +10,9 @@ from w3lib.http import basic_auth_header
|
|||
|
||||
class DataAction(argparse.Action):
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
value = str(values).encode("utf-8").decode("utf-8")
|
||||
value = value[1::] if re.match(r"^\$(.+)", value) else value
|
||||
value = str(values)
|
||||
if value.startswith("$"):
|
||||
value = value[1:]
|
||||
setattr(namespace, self.dest, value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue