From 8765abfb1283eafd3aa948c939b1fae617443750 Mon Sep 17 00:00:00 2001 From: Karen Zeng Date: Thu, 4 May 2023 19:19:11 -0400 Subject: [PATCH] modified fp2_8 --- fp2_8.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']")