mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 06:27:27 +00:00
Merge branch 'dev'
This commit is contained in:
commit
8501f9b78b
1 changed files with 8 additions and 2 deletions
|
@ -48,8 +48,14 @@ class Weeb(cmds.Cog):
|
|||
url = 'https://www.deskhero.ca/products/gmk-metaverse-2'
|
||||
|
||||
browser.get(url)
|
||||
royal_soldout = browser.find_elements_by_css_selector('#data-product-option-1-1')[0].get_attribute('data-soldout')
|
||||
novelties_soldout = browser.find_elements_by_css_selector('#data-product-option-1-3')[0].get_attribute('data-soldout')
|
||||
try:
|
||||
royal_soldout = browser.find_elements_by_css_selector('#data-product-option-1-1')[0].get_attribute('data-soldout')
|
||||
except IndexError:
|
||||
royal_soldout = 'true'
|
||||
try:
|
||||
novelties_soldout = browser.find_elements_by_css_selector('#data-product-option-1-3')[0].get_attribute('data-soldout')
|
||||
except IndexError:
|
||||
novelties_soldout = 'true'
|
||||
|
||||
if royal_soldout != 'true':
|
||||
message += f'Royal is in stock at Deskhero!\n<{url}>\n'
|
||||
|
|
Loading…
Reference in a new issue