This fixes issue #1 #2
@@ -28,8 +28,8 @@ def callback(message):
|
|||||||
# Load the webpage with the zip code
|
# Load the webpage with the zip code
|
||||||
url = 'https://www.sayweee.com/en/product/Want-Want-Senbei-Rice-Crackers/17119'
|
url = 'https://www.sayweee.com/en/product/Want-Want-Senbei-Rice-Crackers/17119'
|
||||||
driver.get(url)
|
driver.get(url)
|
||||||
driver.find_element(By.ID, 'zipcode-input').send_keys(zip_code)
|
driver.find_element(By.XPATH, '/html/body/div[4]/div/div[2]/div/div[2]/div[2]/div/div[1]/form/div/div/div[1]/div/div/div[2]/input').send_keys(zip_code)
|
||||||
driver.find_element(By.ID, 'btn-check-zipcode').click()
|
driver.find_element(By.XPATH, '/html/body/div[4]/div/div[2]/div/div[2]/div[2]/div/div[1]/form/div/div/div[1]/div/div/div[3]/div').click()
|
||||||
|
|
||||||
# Extract the price from the webpage
|
# Extract the price from the webpage
|
||||||
next_data_element = driver.find_element(By.XPATH, "//script[@type='application/ld+json']")
|
next_data_element = driver.find_element(By.XPATH, "//script[@type='application/ld+json']")
|
||||||
|
|||||||
Reference in New Issue
Block a user