Commit
·
a691fb0
1
Parent(s):
7f4c8d9
Update app.py
Browse files
app.py
CHANGED
@@ -176,8 +176,9 @@ def scrape_tokped_with_selenium(nama_barang, num_items):
|
|
176 |
|
177 |
# Temukan elemen kontainer produk berdasarkan XPath atau CSS selector
|
178 |
# Di sini, saya menggunakan XPath sebagai contoh:
|
179 |
-
product_container_xpath = "//div[@class='css-llwpbs']" # Ganti dengan XPath yang sesuai
|
180 |
-
html = driver.
|
|
|
181 |
st.write(html)
|
182 |
# Gunakan BeautifulSoup untuk melakukan parsing HTML
|
183 |
soup = BeautifulSoup(html, "html.parser")
|
|
|
176 |
|
177 |
# Temukan elemen kontainer produk berdasarkan XPath atau CSS selector
|
178 |
# Di sini, saya menggunakan XPath sebagai contoh:
|
179 |
+
#product_container_xpath = "//div[@class='css-llwpbs']" # Ganti dengan XPath yang sesuai
|
180 |
+
html = driver.find_elements_by_xpath('//body//*')
|
181 |
+
#html = driver.find_element(By.XPATH, product_container_xpath)
|
182 |
st.write(html)
|
183 |
# Gunakan BeautifulSoup untuk melakukan parsing HTML
|
184 |
soup = BeautifulSoup(html, "html.parser")
|