diff --git a/fp2_8.py b/fp2_8.py index 187de37..9981ca1 100644 --- a/fp2_8.py +++ b/fp2_8.py @@ -28,8 +28,8 @@ def callback(message): # Load the webpage with the zip code url = 'https://www.sayweee.com/en/product/Want-Want-Senbei-Rice-Crackers/17119' driver.get(url) - driver.find_element(By.ID, 'zipcode-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[2]/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[3]/div').click() # Extract the price from the webpage next_data_element = driver.find_element(By.XPATH, "//script[@type='application/ld+json']")