summaryrefslogtreecommitdiff
path: root/patterns.py
blob: 2bf400d485600e0128665d9b7d57dcfacf39689d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import re

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