Untitled
unknown
python
2 years ago
1.2 kB
2
Indexable
import undetected_chromedriver as uc from selenium import webdriver from discord_webhook import DiscordWebhook from selenium.webdriver.common.by import By import time options = webdriver.ChromeOptions() options.headless = True driver = uc.Chrome(use_subprocess=True) url = "https://www.woodwood.com/da/150/releases/" item = "dunk" refresh_time = 15 size = "US 8.5" webhook = DiscordWebhook(url='https://discord.com/api/webhooks/1024039175093231718/ywY6Pu_xtCirQ1nHkNOtOGN2V4zwNRboOOtRoenz78n8fAVz8TwRaocOMt1tcJgwEonG', content='Yeezy Slide is now online on WoodWood!') driver.get(url) get_source = driver.page_source a = 1 def buy_product(sizing): driver.find_element(By.XPATH, "//button[@class='coi-banner__accept']").click() time.sleep(1) driver.find_element(By.XPATH, "//a[contains(@href, 'dunk')]").click() time.sleep(2) driver.find_element(By.XPATH, "//label[contains(text(),'8.5')]").click() time.sleep(5) while a == 1: if item in get_source: print("True") buy_product(size) break else: time.sleep(refresh_time) print("Not found") driver.refresh()
Editor is loading...