fixes in regex

pull/963/head
Drugsosos 2 years ago
parent a01da8a8bf
commit 50eb5dbc8a
No known key found for this signature in database
GPG Key ID: 8E35176FE617E28D

@ -53,11 +53,11 @@ class FinalVideo:
name: str
) -> str:
name = re.sub(r'[?\\"%*:|<>]', "", name)
name = re.sub(r"( [w,W]\s?\/\s?[o,O,0])", r" without", name)
name = re.sub(r"( [w,W]\s?\/)", r" with", name)
name = re.sub(r"(\d+)\s?\/\s?(\d+)", r"\1 of \2", name)
name = re.sub(r"(\w+)\s?\/\s?(\w+)", r"\1 or \2", name)
name = re.sub(r"\/", "", name)
name = re.sub(r"( [w,W]\s?/\s?[oO0])", r" without", name)
name = re.sub(r"( [w,W]\s?/)", r" with", name)
name = re.sub(r"(\d+)\s?/\s?(\d+)", r"\1 of \2", name)
name = re.sub(r"(\w+)\s?/\s?(\w+)", r"\1 or \2", name)
name = re.sub(r"/", "", name)
# name[:30] # the hell this little guy does? commented until explained
lang = settings.config["reddit"]["thread"]["post_lang"]

Loading…
Cancel
Save