blacklist changes
- compare all strings as lowercase - removed default 'puzzle' keyword
This commit is contained in:
parent
55dd027393
commit
672df0202b
3 changed files with 3 additions and 3 deletions
|
@ -12,4 +12,4 @@ max_time_left = 300
|
||||||
# the minimum point value for a giveaway to be considered
|
# the minimum point value for a giveaway to be considered
|
||||||
minimum_game_points = 5
|
minimum_game_points = 5
|
||||||
# a comma separated list of keywords in game titles to ignore
|
# a comma separated list of keywords in game titles to ignore
|
||||||
blacklist_keywords = hentai,puzzle,adult
|
blacklist_keywords = hentai,adult
|
|
@ -86,7 +86,7 @@ class SteamGifts:
|
||||||
|
|
||||||
if self.blacklist is not None and self.blacklist != ['']:
|
if self.blacklist is not None and self.blacklist != ['']:
|
||||||
for keyword in self.blacklist:
|
for keyword in self.blacklist:
|
||||||
if giveaway.game_name.find(keyword) != -1:
|
if giveaway.game_name.lower().find(keyword.lower()) != -1:
|
||||||
txt = f"Game {giveaway.game_name} contains the blacklisted keyword {keyword}"
|
txt = f"Game {giveaway.game_name} contains the blacklisted keyword {keyword}"
|
||||||
logger.debug(txt)
|
logger.debug(txt)
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -35,7 +35,7 @@ class MyConfig(ConfigParser):
|
||||||
'max_entries': f"{randint(1000, 2500)}",
|
'max_entries': f"{randint(1000, 2500)}",
|
||||||
'max_time_left': f"{randint(180,500)}",
|
'max_time_left': f"{randint(180,500)}",
|
||||||
'minimum_game_points': '1',
|
'minimum_game_points': '1',
|
||||||
'blacklist_keywords': 'hentai,puzzle,adult'
|
'blacklist_keywords': 'hentai,adult'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue