import re #### RE PATTERNS #### re_contains_meow = re.compile(r'(me+o+w|喵|にゃん|nya+n)',re.IGNORECASE) re_contains_bird = re.compile(r'(鸟|鳥)',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