FIxed arguments for a match function.
This commit is contained in:
parent
6a54b88498
commit
647a787974
@ -38,7 +38,7 @@ class EightKunParser(Parser):
|
|||||||
dlfname = f"{post['tim']}{post['ext']}"
|
dlfname = f"{post['tim']}{post['ext']}"
|
||||||
|
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w{1,4}$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
@ -52,7 +52,7 @@ class EightKunParser(Parser):
|
|||||||
for f in post["extra_files"]:
|
for f in post["extra_files"]:
|
||||||
dlfname = f"{f['tim']}{f['ext']}"
|
dlfname = f"{f['tim']}{f['ext']}"
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w+$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
|
@ -38,7 +38,7 @@ class FourChanParser(Parser):
|
|||||||
dlfname = f"{post['tim']}{post['ext']}"
|
dlfname = f"{post['tim']}{post['ext']}"
|
||||||
|
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w{1,4}$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
|
@ -41,7 +41,7 @@ class LainchanParser(Parser):
|
|||||||
dlfname = f"{post['tim']}{post['ext']}"
|
dlfname = f"{post['tim']}{post['ext']}"
|
||||||
|
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w{1,4}$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
@ -55,7 +55,7 @@ class LainchanParser(Parser):
|
|||||||
for f in post["extra_files"]:
|
for f in post["extra_files"]:
|
||||||
dlfname = f"{f['tim']}{f['ext']}"
|
dlfname = f"{f['tim']}{f['ext']}"
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w+$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
|
@ -40,7 +40,7 @@ class LolifoxParser(Parser):
|
|||||||
dlfname = f"{post['tim']}{post['ext']}"
|
dlfname = f"{post['tim']}{post['ext']}"
|
||||||
|
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w{1,4}$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
@ -54,7 +54,7 @@ class LolifoxParser(Parser):
|
|||||||
for f in post["extra_files"]:
|
for f in post["extra_files"]:
|
||||||
dlfname = f"{f['tim']}{f['ext']}"
|
dlfname = f"{f['tim']}{f['ext']}"
|
||||||
if "filename" in post:
|
if "filename" in post:
|
||||||
if match(post['filename'], r"^image\.\w+$") is None:
|
if match(r"^image\.\w+$", post['filename']) is None:
|
||||||
filename = dlfname
|
filename = dlfname
|
||||||
else:
|
else:
|
||||||
filename = f"{post['filename']}{post['ext']}"
|
filename = f"{post['filename']}{post['ext']}"
|
||||||
|
Loading…
Reference in New Issue
Block a user