stuff
This commit is contained in:
parent
e8596fb544
commit
fd9e5ba23e
3 changed files with 3 additions and 4 deletions
|
@ -47,4 +47,4 @@ web.basic_auth = true
|
|||
# basic auth username
|
||||
web.basic_auth.username = admin
|
||||
# basic auth password
|
||||
web.basic_auth.password = admin
|
||||
web.basic_auth.password = ChangeMe
|
|
@ -182,7 +182,7 @@ class SteamGifts:
|
|||
|
||||
for item in unentered_game_list:
|
||||
giveaway = Giveaway(item)
|
||||
txt = f"〰️ {giveaway.game_name} - {giveaway.cost}P - {giveaway.game_entries} entries " \
|
||||
txt = f"〰 {giveaway.game_name} - {giveaway.cost}P - {giveaway.game_entries} entries " \
|
||||
f"(w/ {giveaway.copies} copies) - Created {giveaway.time_created_string} ago " \
|
||||
f"with {giveaway.time_remaining_string} remaining by {giveaway.user}."
|
||||
logger.info(txt)
|
||||
|
|
|
@ -8,7 +8,6 @@ logger = log.get_logger(__name__)
|
|||
class Giveaway:
|
||||
|
||||
def __init__(self, soup_item):
|
||||
self.soup_item = soup_item
|
||||
self.steam_app_id = None
|
||||
self.steam_url = None
|
||||
self.game_name = None
|
||||
|
@ -35,7 +34,7 @@ class Giveaway:
|
|||
self.giveaway_uri = soup_item.select_one('a.giveaway__heading__name')['href']
|
||||
pin_class = soup_item.parent.parent.get("class")
|
||||
self.pinned = pin_class is not None and len(pin_class) > 0 and pin_class[0].find('pinned') != -1
|
||||
self.cost, self.copies = self.determine_cost_and_copies(self.soup_item, self.game_name, self.giveaway_game_id)
|
||||
self.cost, self.copies = self.determine_cost_and_copies(soup_item, self.game_name, self.giveaway_game_id)
|
||||
self.game_entries = int(soup_item.select('div.giveaway__links span')[0].text.split(' ')[0].replace(',', ''))
|
||||
contributor_level = soup_item.select_one('div[title="Contributor Level"]')
|
||||
self.contributor_level = self.determine_contributor_level(contributor_level)
|
||||
|
|
Loading…
Reference in a new issue