mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 13:02:38 +00:00
Fix index error
This commit is contained in:
parent
84d1e0d878
commit
4608d533a1
1 changed files with 4 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue