Add missing example config options, fix Steam URL parsing

This commit is contained in:
Manuel 2024-10-17 16:48:30 +02:00
parent 893229363f
commit a30fa1aad6
Signed by: Manuel
GPG key ID: 4085037435E1F07A
2 changed files with 7 additions and 1 deletions

View file

@ -10,6 +10,8 @@ all.minimum_points = 50
all.max_entries = 2000 all.max_entries = 2000
# time left in minutes of a giveaway for it to be considered # time left in minutes of a giveaway for it to be considered
all.max_time_left = 300 all.max_time_left = 300
# points after that giveaway is considered regardless of entries and time left
all.max_points = 350
# the minimum point value for a giveaway to be considered # the minimum point value for a giveaway to be considered
all.minimum_game_points = 1 all.minimum_game_points = 1
# a comma separated list of keywords in game titles to ignore # a comma separated list of keywords in game titles to ignore
@ -24,6 +26,8 @@ wishlist.minimum_points = 1
wishlist.max_entries = 10000 wishlist.max_entries = 10000
# time left in minutes of a giveaway for it to be considered # time left in minutes of a giveaway for it to be considered
wishlist.max_time_left = 300 wishlist.max_time_left = 300
# points after that giveaway is considered regardless of entries and time left
wishlist.max_points = 350
[DLC] [DLC]
# should we consider giveaways on the 'DLC' page? # should we consider giveaways on the 'DLC' page?
@ -34,6 +38,8 @@ dlc.minimum_points = 1
dlc.max_entries = 10000 dlc.max_entries = 10000
# time left in minutes of a giveaway for it to be considered # time left in minutes of a giveaway for it to be considered
dlc.max_time_left = 300 dlc.max_time_left = 300
# points after that giveaway is considered regardless of entries and time left
dlc.max_points = 350
[NOTIFICATIONS] [NOTIFICATIONS]
# a prefix for messages sent via notifications # a prefix for messages sent via notifications

View file

@ -59,7 +59,7 @@ class GiveawayEntry:
return None return None
def _get_steam_app_id(self, steam_url): def _get_steam_app_id(self, steam_url):
match = re.search('^.+/[a-z0-9]+/(?P<steam_app_id>[0-9]+)/$', steam_url, re.IGNORECASE) match = re.search('^.+/[a-z0-9]+/(?P<steam_app_id>[0-9]+)(/|\?)', steam_url, re.IGNORECASE)
if match: if match:
return match.group('steam_app_id') return match.group('steam_app_id')
else: else: