I want to scrape this marketplace data https://www.tokopedia.com/search?st=shop&q=dapur
but to get the data, that I want, I must go through pass some layers in the page.
In this case this web have 3 layers
, 1st layer is the shop catalogue or the Starting URL
page:
(in this page users must click the Lihat Toko
button to go to the next layer):
2nd layer, is the Shop profile
(In this page users must click the Info Toko
button to go to the final layer/pop up content):
Final layer, is the pop up content. I want to get the data from this pop up box:
This is my code:
from selenium import webdriver
chrome_path = r"E:\Chromedriver\chromedriver.exe"
driver = webdriver.Chrome(chrome_path)
driver.get("https://www.tokopedia.com/search?st=shop&q=dapur")
driver.find_element_by_xpath('//div[@class="css-gmuwbf"]//button[1]').click()
driver.find_element_by_xpath('//div[@class="css-ais6tt"]//button[3]').click()
I've run the code, but always have an error messages.