-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfprettyutils.py
132 lines (129 loc) · 11.3 KB
/
fprettyutils.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import re
# Source replacements
source_dict = dict([
('ungrounded.net', (lambda lc: "https://www.newgrounds.com/portal/view/"+re.search(r'(?<=\d/)(.*?)(?=_)', lc).group(0))),
('y8.com', (lambda lc: None if (lc.endswith('.html') or lc.endswith('.html"')) else "https://en.y8.com/games"+lc[lc.rindex("/"):lc.rindex(".")])),
('cms.miniclip.com', (lambda lc: "https://www."+re.search(r'miniclip.com/games/(.*?)/', lc).group(0)+"en/")),
('miniclip.com/games/', (lambda lc: "https://www."+re.search(r'miniclip.com/games/(.*?)/', lc).group(0)+"en/")),
('miniclip.com/gameloader.swf', (lambda lc: "https://www.miniclip.com/games/"+re.search('(?<=fn.)(.*?)/', lc).group(0)+"en/")),
('/miniclip.com', (lambda lc: "https://www.miniclip.com/games/"+re.search('(?<=.com/)(.*?)/', lc).group(0)+"en/")),
('www.miniclip.com', (lambda lc: "https://www.miniclip.com/games/"+re.search('(?<=.com/)(.*?)/', lc).group(0)+"en/")),
('coolmathgames.com', (lambda lc: lc[:lc.rindex("/")+1])),
('games.jayisgames.com', (lambda lc: "https://jayisgames.com/games"+lc[lc.rindex("/"):lc.rindex(".")]+"/")),
('kraisoft.com', (lambda lc: re.search(r'(.*)/(.*)/(.*?)/', lc).group(0))),
('stickpage.com', (lambda lc: "https://www.stickpage.com/"+re.search(r'(\w+?)\.swf', lc).group(1)+"play.shtml"))
])
# Dev/Publisher replacements
publisher_list = [
(r'\.com/', '.com'),
(r'(?i)(^|;\s)(www.)?Newgrounds(\.com)(?=;|$)', '\g<1>Newgrounds'),
(r'(?i)(^|;\s)(www.)?Deviant\s?art(\.com)?(?=;|$)', '\g<1>DeviantArt'),
(r'(?i)(^|;\s)(www.)?Armor\s?games(\.com)?(?=;|$)', '\g<1>Armor Games'),
(r'(?i)(^|;\s)(www.)?Cartoon\s?network(\.(com|nl|es|fr))?(?=;|$)', '\g<1>Cartoon Network'),
(r'(?i)(^|;\s)(www.)?Kongregate(\.com)?(?=;|$)', '\g<1>Kongregate'),
(r'(?i)(^|;\s)(www.)?Y8(\.com)?(?=;|$)', '\g<1>Y8'),
(r'(?i)(^|;\s)(www.)?Andkon(\.com)?(?=;|$)', '\g<1>Andkon'),
(r'(?i)(^|;\s)(www.)?Max\s?Games(\.com)?(?=;|$)', '\g<1>Max Games'),
(r'(?i)(^|;\s)(www.)?Rusty\s?Arcade(\.com)?(?=;|$)', '\g<1>Rusty Arcade'),
(r'(?i)(^|;\s)(www.)?Roxi\s?Games(\.com)?(?=;|$)', '\g<1>RoxiGames'),
(r'(?i)(^|;\s)(www.)?Games\s?Sumo(\.com)?(?=;|$)', '\g<1>GamesSumo'),
(r'(?i)(^|;\s)(www.)?Pupu\s?Games(\.com)?(?=;|$)', '\g<1>Pupu Games'),
(r'(?i)(^|;\s)(www.)?Play\s?Toon\s?Games(\.com)?(?=;|$)', '\g<1>Play Toon Games'),
(r'(?i)(^|;\s)(www.|^)King\s?Games(\.net)?(?=;|$)', '\g<1>King Games'),
(r'(?i)(^|;\s)(www.)?Inka\s?Games(\.com)?(?=;|$)', '\g<1>Inka Games'),
(r'(?i)(^|;\s)(www.)?Nickelodeon(\.com)?(?=;|$)', '\g<1>Nickelodeon'),
(r'(?i)(^|;\s)(www.)?1000(Web)?\s?Games(\.com)?(?=;|$)', '\g<1>1000 Web Games'),
(r'(?i)(^|;\s)(www.)?123\s?Bee(\.com)?(?=;|$)', '\g<1>123Bee'),
(r'(?i)(^|;\s)(www.)?123\s?Chase(\.com)?(?=;|$)', '\g<1>123Chase'),
(r'(?i)(^|;\s)(www.)?123\s?Peppy(\.com)?(?=;|$)', '\g<1>123peppy'),
(r'(?i)(^|;\s)(www.)?143\s?Dressup(\.com)?(?=;|$)', '\g<1>143Dressup'),
(r'(?i)(^|;\s)(www.)?143\s?Kids\s?Games(\.com)?(?=;|$)', '\g<1>143Kidsgames'),
(r'(?i)(^|;\s)(www.)?1Coin1Play(\.com)?(?=;|$)', '\g<1>1Coin1Play'),
(r'(?i)(^|;\s)(www.)?1Cooking\s?Games(\.com)?(?=;|$)', '\g<1>1CookingGames'),
(r'(?i)(^|;\s)(www.)?1GameSite(\.com)?(?=;|$)', '\g<1>1Gamesite'),
(r'(?i)(^|;\s)(www.)?2D\s?Play(\.com)?(?=;|$)', '\g<1>2DPlay'),
(r'(?i)(^|;\s)(www.)?2Games(\.com)?(?=;|$)', '\g<1>2Games'),
(r'(?i)(^|;\s)(www.)?2keys\s?games(\.com)?(?=;|$)', '\g<1>2keysGames'),
(r'(?i)(^|;\s)(www.)?2PGame(\.com)?(?=;|$)', '\g<1>2PGame'),
(r'(?i)(^|;\s)(www.)?4399(\.com)?(?=;|$)', '\g<1>4399'),
(r'(?i)(^|;\s)(www.)?4\s?kids(\sTV)(\.com)?(?=;|$)', '\g<1>4Kids'),
(r'(?i)(^|;\s)(www.)?4v4(\.com)?(?=;|$)', '\g<1>4v4'),
(r'(?i)(^|;\s)(www.)?5Hippos(\.com)?(?=;|$)', '\g<1>5Hippos'),
(r'(?i)(^|;\s)(www.)?5xPLAY(\.com)?(?=;|$)', '\g<1>5xPLAY'),
(r'(?i)(^|;\s)(www.)?7DFPS\.com(?=;|$)', '\g<1>7DFPS'),
(r'(?i)(^|;\s)8Bit\.com(?=;|$)', '\g<1>8bit.com'),
(r'(?i)(^|;\s)(www.)?9bgamesames(\.com)?(?=;|$)', '\g<1>9bgames'),
(r'(?i)(^|;\s)(www.)?9mine(\.com)?(?=;|$)', '\g<1>9mine'),
(r'(?i)(^|;\s)(www.)?Addicting\s?Games(\.com)?(?=;|$)', '\g<1>Addicting Games'),
(r'(?i)(^|;\s)(www.)?Albino\s?Blacksheep(\.com)?(?=;|$)', '\g<1>Albino Blacksheep'),
(r'(?i)(^|;\s)(www.)?All\s?For\s?Girls(\.net)?(?=;|$)', '\g<1>AllForGirls'),
(r'(?i)(^|;\s)(www.)?AllgamesAllFree(\.com)?(?=;|$)', '\g<1>AllGamesAllFree'),
(r'(?i)(^|;\s)(www.)?Arcade\s?Bomb(\.com)?(?=;|$)', '\g<1>Arcadebomb'),
(r'(?i)(^|;\s)(www.)?Baby\s?Daisy\s?Games(\.com)?(?=;|$)', '\g<1>Baby Daisy Games'),
(r'(?i)(^|;\s)(www.)?Big\s?Fish\s?Games(\.com)?(?=;|$)', '\g<1>Big Fish Games'),
(r'(?i)(^|;\s)(www.)?Box\s?10(\.com)?(?=;|$)', '\g<1>Box10'),
(r'(?i)(^|;\s)(www.)?Bubblebox(\.com)?(?=;|$)', '\g<1>Bubblebox'),
(r'(?i)(^|;\s)(www.)?Cartoon\s?Race(\.com)?(?=;|$)', '\g<1>CartoonRace'),
(r'(?i)(^|;\s)(www.)?Chuck\sw\.?\sCheese\'?s?(\.com)?(?=;|$)', '\g<1>Chuck E. Cheese\'s'),
(r'(?i)(^|;\s)(www.)?Click\s?Jogos(\.com)?(\.br)?(?=;|$)', '\g<1>Click Jogos'),
(r'(?i)(^|;\s)(www.)?Coca\s?\-?Cola(\.com)?(?=;|$)', '\g<1>Coca-Cola'),
(r'(?i)(^|;\s)(www.)?Cooking\s?Games(\.com)?(?=;|$)', '\g<1>Cooking Games'),
(r'(?i)(^|;\s)(www.)?Cooking\s?Pink(\.com)?(?=;|$)', '\g<1>Cooking Pink'),
(r'(?i)(^|;\s)(www.)?Cool\s?Budd?y(\.com)?(?=;|$)', '\g<1>Coolbuddy.com'),
(r'(?i)(^|;\s)(www.)?Cool\s?Games\s?box(\.com)?(?=;|$)', '\g<1>Cool Games Box'),
(r'(?i)(^|;\s)(www.)?Cool\s?math[\s\-]?games(\.com)?(?=;|$)', '\g<1>Cool Math Games'),
(r'(?i)(^|;\s)(www.)?Cool\s?math(\.com)?(, Inc.)?(?=;|$)', '\g<1>Cool Math'),
(r'(?i)(^|;\s)(www.)?Cool\s?temple(\.com)?(?=;|$)', '\g<1>Cool Temple'),
(r'(?i)(^|;\s)(www.)?Crazy\s?games(\.com)?(?=;|$)', '\g<1>Crazy Games'),
(r'(?i)(^|;\s)(www.)?Cosmictopia(\.com)?(?=;|$)', '\g<1>Cosmictopia'),
(r'(?i)(^|;\s)(www.)?Cute\s?FlashGames(\.com)?(?=;|$)', '\g<1>Cute Flash Games'),
(r'(?i)(^|;\s)(www.)?Daily\s?Games(\.com)?(?=;|$)', '\g<1>Daily Games'),
(r'(?i)(^|;\s)(www.)?Daily\s?Bike\s?Games(\.com)?(?=;|$)', '\g<1>Daily Bike Games'),
(r'(?i)(^|;\s)(www.)?Dannyz\s?Games(\.com)?(?=;|$)', '\g<1>DannyzGames'),
(r'(?i)(^|;\s)(www.)?Daria\s?Games(\.com)?(?=;|$)', '\g<1>Daria Games'),
(r'(?i)(^|;\s)(www.)?Dark\s?Horror\s?Games(\.com)?(?=;|$)', '\g<1>Dark Horror Games'),
(r'(?i)(^|;\s)(www.)?Dede\s?Games(\.com)?(?=;|$)', '\g<1>Dedegames'),
(r'(?i)(^|;\s)(www.)?Devilish\s?Free(\.com)?(?=;|$)', '\g<1>DevilishFree'),
(r'(?i)(^|;\s)(www.)?Dibblez(\.com)?(?=;|$)', '\g<1>Dibblez'),
(r'(?i)(^|;\s)(www.)?Didi\sGames(\.com)?(?=;|$)', '\g<1>Didi Games'),
(r'(?i)(^|;\s)(www.)?Difference\s?Games(\.com)?(?=;|$)', '\g<1>DifferenceGames'),
(r'(?i)(^|;\s)(www.)?Dili\s?Games(\.com)?(?=;|$)', '\g<1>Diligames'),
(r'(?i)(^|;\s)(www.)?Dino\s?Hill(\.com)?(?=;|$)', '\g<1>DinoHill'),
(r'(?i)(^|;\s)(www.)?Discovery\s?Kids\s?(Play)?(Plus)?(\.com)?(?=;|$)', '\g<1>Discovery Kids'),
(r'(?i)(^|;\s)(www.)?Disney\sPrincess\s?Games(\.com)?(?=;|$)', '\g<1>Disney Princess Games'),
(r'(?i)(^|;\s)(www.)?Disney(\.(com|ru|co\.uk))?(?=;|$)', '\g<1>Disney'),
(r'(?i)(^|;\s)(www.)?DlSite(\.com)?(?=;|$)', '\g<1>DLsite'),
(r'(?i)(^|;\s)(www.)?Doli\s?Doli(\.com)?(?=;|$)', '\g<1>DoliDoli'),
(r'(?i)(^|;\s)(www.)?Doll\s?Divine(\.com)?(?=;|$)', '\g<1>Doll Divine'),
(r'(?i)(^|;\s)(www.)?Dolly\s?Gals(\.com)?(?=;|$)', '\g<1>DollyGals'),
(r'(?i)(^|;\s)(www.)?Dona\s?Games(\.com)?(?=;|$)', '\g<1>Donagames'),
(r'(?i)(^|;\s)(www.)?Double\s?Games(\.com)?(?=;|$)', '\g<1>DoubleGames'),
(r'(?i)(^|;\s)(www.)?Doyu\s?Games(\.com)?(?=;|$)', '\g<1>Doyu Games'),
(r'(?i)(^|;\s)(www.)?Dragon\s?Gamez(\.com)?(?=;|$)', '\g<1>Dragon Gamez'),
(r'(?i)(^|;\s)(www.)?DreamWorks(\s?Animation(\sLCC)?)?(\.com)?(?=;|$)', '\g<1>DreamWorks'),
(r'(?i)(^|;\s)(www.)?Flash\s?Games\s?247(\.com)?(?=;|$)', '\g<1>Flash Games 247'),
(r'(?i)(^|;\s)(www.)?Pixar(\.com)?(?=;|$)', '\g<1>Pixar')
]
# Tags
# Adventure = all but Role-Playing
# Arcade = all but Clicker, Runner, Variety
# Sports = all but Archery, Cycling, Swimming, Racing
# Puzzle = all but Maze, Matching, Stealth
# Simulation = all but Driving, Flying, Gambling
# Strategy = all but Turn-Based
# Others get either specfic tags or all subtags
tag_list = {
'Action': ['Run \'n\' Gun'],
'Adventure': ['Choose Your Own Adventure', 'Dating Simulator', 'Dungeon Crawler', 'Escape the Room', 'Interactive Fiction', 'Metroidvania', 'MMO', 'Point and Click', 'Survival', 'Visual Novel'],
'Arcade': ['Balancing', 'Button Masher', 'Bounce', 'Brick Breaker', 'Claw Game', 'Catching', 'Cross the Road', 'Endless Flyer', 'Endless Jumper', 'Fixed Shooter', 'Food Chain', 'Launch', 'Pellet Maze', 'Pinball', 'Pong', 'Rhythm', 'Rock-Paper-Scissors', 'Score-Attack', 'Snake', 'Stacking', 'Tetris', 'Timing', 'Toss', 'Whack-A-Mole'],
'Card': ['Ace Trumps', 'Blackjack', 'Collectible Card Game', 'Poker', 'Shedding', 'Solitaire'],
'Educational': ['Computer Science', 'Science'],
'Puzzle': ['Codebreaker', 'Connect the Dots', 'Find', 'Hangman', 'Hidden Objects', 'Jigsaw', 'Lemmings', 'Logic', 'Marble Popper', 'Match-3', 'Memory', 'Minesweeper', 'Mixing', 'Nonogram', 'Peg Solitaire', 'Pipe Connector', 'Sequential', 'Sliding', 'Sokoban', 'Spot the Difference', 'Sudoku', 'Tile Merger', 'Vertical Drop', 'Word'],
'Simulation': ['Babysitting', 'Bingo', 'Cooking', 'Cleaning', 'Dentist', 'Dice', 'Doctor', 'Farming', 'Fishing', 'Hairdressing', 'Hunting', 'Luck Roller', 'Mahjong', 'Parking', 'Pet', 'Restaurant', 'Slot Machine', 'Spa', 'Surgery', 'Repairing', 'Tabletop', 'Tattoo Artist', 'Time Management', 'Tycoon', 'Virtual World', 'Walking Simulator'],
'Sports': ['American Football', 'Athletics', 'Baseball', 'Basketball', 'Billiards', 'Boating', 'Bowling', 'Boxing', 'Cricket', 'Curling', 'Equestrianism', 'Golf', 'Hockey', 'Motocross', 'Skateboarding', 'Skating', 'Skiing', 'Snowboarding', 'Soccer', 'Surfing', 'Tennis', 'Volleyball'],
'Strategy': ['Ataxx', 'Battleship', 'Checkers', 'Chess', 'Domiones', 'Lane-Based Strategy', 'Node-Based Strategy', 'Real-Time Strategy', 'Reversi', 'Tower Defense', 'Tic-Tac-Toe'],
'Game Jam': ['7DRL Challenge', 'BC Game Jam', 'BenBonk Game Jam', 'Butterscotch ShenaniJam', 'Casual Gameplay Design Competition', 'Decade Jam', 'Game Maker\'s Toolkit Game Jam', 'Game in Ten Days', 'Global Game Jam', 'Homestuck Game Jam', 'Lisp Game Jam', 'LOWREZJAM', 'Ludum Dare', 'Make-A-Thing Jam', 'Metroidvania Month', 'Mini Jam', 'NG Game Jam', 'Nokia 3310 Jam', 'Nordic Game Jam', 'One Game a Month', 'Pastel Jam', 'Pizza Jam', 'SPJam', 'Starmen.Net Funfest', 'Stencyl Jam', 'The Boob Jam', 'Touhou Fan Game Jam', 'xkcd Game Jam'],
'Pixel': ['GB Studio', 'PICO-8', 'LOWREZJAM', 'Nokia 3310 Jam'],
'Sexual Content': ['Anal', 'Anal Insertion', 'Anilingus', 'Cunnilingus', 'Fellatio', 'Fingering', 'Fisting', 'Footjob', 'Frottage', 'Handjob', 'Masturbation', 'Oral', 'Paizuri', 'Sex Toys', 'Tentacles', 'Touching', 'Tribadism', 'Vaginal', 'Vaginal Insertion'],
'Adult': ['Anal', 'Anal Insertion', 'Anilingus', 'Cunnilingus', 'Fellatio', 'Fingering', 'Fisting', 'Footjob', 'Frottage', 'Handjob', 'Masturbation', 'Oral', 'Paizuri', 'Sex Toys', 'Tentacles', 'Touching', 'Tribadism', 'Vaginal', 'Vaginal Insertion', 'Hentai', 'Cartoon Porn', 'Porn', 'BDSM', 'Bestiality', 'Breast Milking', 'Cannibalism', 'Enema', 'Gloryhole', 'Incest', 'Necrophilia', 'Oviposition', 'Podophilia', 'Quicksand', 'Vore']
}