mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 14:47:29 +00:00
Merge branch 'dev'
This commit is contained in:
commit
542ce056d4
1 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,10 @@ class Weeb(cmds.Cog):
|
||||||
|
|
||||||
for item, url in urls.items():
|
for item, url in urls.items():
|
||||||
browser.get(url)
|
browser.get(url)
|
||||||
|
try:
|
||||||
status = browser.find_elements_by_css_selector('#addToCartText-product-template')[0].text
|
status = browser.find_elements_by_css_selector('#addToCartText-product-template')[0].text
|
||||||
|
except IndexError:
|
||||||
|
status = 'SOLD OUT'
|
||||||
|
|
||||||
if status != 'SOLD OUT':
|
if status != 'SOLD OUT':
|
||||||
message += f'{item} is in stock at Switchmod!\n<{url}>\n'
|
message += f'{item} is in stock at Switchmod!\n<{url}>\n'
|
||||||
|
@ -72,8 +75,9 @@ class Weeb(cmds.Cog):
|
||||||
|
|
||||||
browser.quit()
|
browser.quit()
|
||||||
self.weebing = False
|
self.weebing = False
|
||||||
|
print('STOPPED : weebing')
|
||||||
|
|
||||||
await asyncio.sleep(60)
|
await asyncio.sleep(120)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
tb.print_exc()
|
tb.print_exc()
|
||||||
|
|
Loading…
Reference in a new issue