chore: Log failure

parent 20368d37
......@@ -9,10 +9,11 @@ def main():
soup = BeautifulSoup(res.content, "html.parser")
name = soup.find(attrs={"class": "product_title"}).text
stock = soup.find(attrs={"class": "stock"}).text
print("%s: %s" % (name, stock))
if "Out of stock" not in stock:
sms("%s in stock 🎉 \"%s\"\n🔗 %s" % (name, stock, url))
else:
print("%s not in stock, try again 🙃" % name)
def sms(msg: str):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment