fix datestr \n
This commit is contained in:
parent
727a14864e
commit
aa0f2a571c
@ -682,6 +682,7 @@ class TorrentSpider:
|
|||||||
elif method_name == "replace" and isinstance(args, list):
|
elif method_name == "replace" and isinstance(args, list):
|
||||||
text = text.replace(r"%s" % args[0], r"%s" % args[-1])
|
text = text.replace(r"%s" % args[0], r"%s" % args[-1])
|
||||||
elif method_name == "dateparse" and isinstance(args, str):
|
elif method_name == "dateparse" and isinstance(args, str):
|
||||||
|
text = text.replace("\n", " ").strip()
|
||||||
text = datetime.datetime.strptime(text, r"%s" % args)
|
text = datetime.datetime.strptime(text, r"%s" % args)
|
||||||
elif method_name == "strip":
|
elif method_name == "strip":
|
||||||
text = text.strip()
|
text = text.strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user