From b99178fd7b03a7ebd1f65b8b60814a32f13f2333 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Tue, 28 Mar 2023 15:11:11 +0200 Subject: scan timeline, formatting --- patterns.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'patterns.py') diff --git a/patterns.py b/patterns.py index 9118227..a91064f 100644 --- a/patterns.py +++ b/patterns.py @@ -2,6 +2,14 @@ import re #### RE PATTERNS #### re_contains_meow = re.compile(r'(me+o+w|喵)',re.IGNORECASE) - +re_contains_bird = re.compile(r'(鸟|bird)',re.IGNORECASE) #### MISC STRING PRESETS #### cat_sounds = ["Meow!", "Mrrrow!", "Purr...", "Meee-OW!", "Mreoww!", "Nya~", "Mew?", "Rowr?", "Prrrr...", "Maow-maow!"] +bird_sounds = ["鸟!", "chirp!"] + +#### PARSE STATUS HTMLs.... +RE_HTML_CLEANR = re.compile('<.*?>') + +def cleanhtml(raw_html): + cleantext = re.sub(RE_HTML_CLEANR, '', raw_html) + return cleantext -- cgit v1.2.3-70-g09d2