4815162342lost / steam_gifts_bot

bot for http://www.steamgifts.com/
GNU General Public License v3.0
32 stars 6 forks source link

Fix - script crashes if there is no pinned giveaways #8

Closed grray closed 5 years ago

grray commented 6 years ago

If there is no pinned giveaways (at top of list):

You are using the latest version of the program. You version: 1.3.0 Traceback (most recent call last): File "/opt/steam_gifts_bot/sg.py", line 465, in <module> get_games_from_banners() File "/opt/steam_gifts_bot/sg.py", line 418, in get_games_from_ba banners = soup.find(class_="pinned-giveaways__inner-wrap pinned AttributeError: 'NoneType' object has no attribute 'find_all'

Is commented out in PR code really needed?

4815162342lost commented 5 years ago

Hey grray,

Thanks for report this bug!

I will try to fix it. Unfortunately i can not apply your commit, i will try to fix the issue via different way.

Thank you!