Changed steam sale offer checker
All checks were successful
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 4m12s
All checks were successful
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 4m12s
This commit is contained in:
parent
6121299f20
commit
2da30a917d
@ -66,7 +66,7 @@ class SteamOfferWatcher(TaskABC):
|
|||||||
def _get_games_from_page(self, start: int, count: int) -> List[SteamSpecialOffer]:
|
def _get_games_from_page(self, start: int, count: int) -> List[SteamSpecialOffer]:
|
||||||
games = List(SteamSpecialOffer)
|
games = List(SteamSpecialOffer)
|
||||||
result = requests.get(
|
result = requests.get(
|
||||||
f"https://store.steampowered.com/search/results?query&start={start}&count={count}&force_infinite=1&specials=1"
|
f"https://store.steampowered.com/search/results?query&start={start}&count={count}&force_infinite=1&specials=1&filter=topsellers"
|
||||||
)
|
)
|
||||||
soup = bs4.BeautifulSoup(result.text, "lxml")
|
soup = bs4.BeautifulSoup(result.text, "lxml")
|
||||||
elements = soup.find_all("a", {"class": "search_result_row"})
|
elements = soup.find_all("a", {"class": "search_result_row"})
|
||||||
@ -109,7 +109,7 @@ class SteamOfferWatcher(TaskABC):
|
|||||||
new_offers = List(SteamSpecialOffer)
|
new_offers = List(SteamSpecialOffer)
|
||||||
|
|
||||||
# sale_count = self._get_max_count() + 100
|
# sale_count = self._get_max_count() + 100
|
||||||
sale_count = 500 # only look at first 500
|
sale_count = 250 # only look at first 500
|
||||||
# todo: let admins change the value
|
# todo: let admins change the value
|
||||||
self._logger.debug(__name__, f"Get special offers from 0 to {sale_count}")
|
self._logger.debug(__name__, f"Get special offers from 0 to {sale_count}")
|
||||||
for i in range(0, sale_count, 100):
|
for i in range(0, sale_count, 100):
|
||||||
|
Loading…
Reference in New Issue
Block a user