forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFMLformatter.py
55 lines (54 loc) · 2.17 KB
/
FMLformatter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from htmltagremove import htr
def formatter(data):
newdata = []
data = htr(data)
bad = ["Your nick : Categories : ","\r","Advanced search - last",
"FMyLife","Get the guts to spill the beans","FML: Your random funny stories",
"Woman","Man","Choose","Health","Intimacy","Miscellaneous","Man or woman? ",
"Money","Kids","Work","Love","Email notification?",
"Moderate the FMLs","Submit your FML story",
"- If your story isn't published on the website, don't feel offended, and thank you nevertheless!",
"Pick a country","See all","Your account","Team's blog",
"Meet the FMLHello readers! Did you meet someone new this...The whole blog",
"Amazon","Borders","IndieBound","Personalized book","Terms of use",
"FML t-shirts -","Love - Money - Kids - Work - Health - Intimacy - Miscellaneous - Members",
"Follow the FML Follow the FML blog Follow the FML comments ",
"_qoptions={",
"};","})();","Categories","Sign up - Password? ", " Net Avenir : gestion publicitaire",
"FMyLife, the book","Available NOW on:","Barnes & Noble"]
for checkable in data:
if checkable in bad:
pass
elif "_gaq.push" in checkable:
pass
elif "ga.src" in checkable:
pass
elif "var _gaq" in checkable:
pass
elif "var s =" in checkable:
pass
elif "var ga" in checkable:
pass
elif "function()" in checkable:
pass
elif "siteanalytics" in checkable:
pass
elif "qacct:" in checkable:
pass
elif "\r" in checkable:
pass
elif "ic_" in checkable:
pass
elif "Please note that spam and nonsensical stories" in checkable:
pass
elif "Refresh this page" in checkable:
pass
elif "You...The whole blo" in checkable:
pass
elif "Net Avenir : gestion publicitair" in checkable:
pass
else:
if "Net Avenir : gestion publicitaireClose the advertisement" in checkable:
checkable = checkable.replace("Net Avenir : gestion publicitaireClose the advertisement","")
newdata.append(checkable)
return newdata