Skip to content

Commit

Permalink
added debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeN220 committed Apr 9, 2024
1 parent 44da96f commit 989e011
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():
telegram = TelegramAPI(config.telegram.bot_token)
market = MarketAPI(lolzteam_token)
me = market.get_me()
print(me)
logging.info("Успешная авторизация с аккаунта: %s", me["user"])
count_purchase = 0
searches = []
for search_url in config.lolzteam.search_urls_list:
Expand All @@ -46,13 +46,14 @@ def main():
)

for item in items:
logging.debug("Аккаунт: %s", item)
if me["user"]["user_id"] == item["seller"]["user_id"]:
continue
item_id = item["item_id"]
market_item = MarketItem(item, lolzteam_token)
try:
logging.info("Покупаю аккаунт %s", item_id)
market_item.fast_buy()
# market_item.fast_buy()
except MarketBuyError as error:
logging.warning(
"При попытке покупки аккаунта %s произошла ошибка: %s",
Expand Down

0 comments on commit 989e011

Please sign in to comment.