mirror of https://github.com/scrapy/scrapy.git
fix: regex
This commit is contained in:
parent
88c58a8c9c
commit
69f96b9e96
|
|
@ -11,7 +11,7 @@ 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")
|
||||
if items := re.findall(r"{.+}", value):
|
||||
if items := re.findall(r"\$(.+)", value):
|
||||
value = items[0]
|
||||
|
||||
setattr(namespace, self.dest, value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue