diff --git a/src/cogs/weeb.py b/src/cogs/weeb.py index 50b46f2..f74b9c9 100644 --- a/src/cogs/weeb.py +++ b/src/cogs/weeb.py @@ -31,7 +31,10 @@ class Weeb(cmds.Cog): for item, url in urls.items(): browser.get(url) - status = browser.find_elements_by_css_selector('#addToCartText-product-template')[0].text + try: + status = browser.find_elements_by_css_selector('#addToCartText-product-template')[0].text + except IndexError: + status = 'SOLD OUT' if status != 'SOLD OUT': message += f'{item} is in stock at Switchmod!\n<{url}>\n'