Untitled
unknown
python
4 years ago
786 B
4
Indexable
from selenium import webdriver
from msedge.selenium_tools import EdgeOptions
# %%
_edge_options = EdgeOptions()
driver = webdriver.Edge(
executable_path="C:\\Users\quang\\PycharmProjects\\laptops-price-analysis-and-prediction\\Scrape\\msedgedriver.exe")
driver.get("https://fptshop.com.vn/dien-thoai/iphone-13-pro-max?dung-luong=128gb")
driver.find_element_by_link_text("Xem cấu hình chi tiết").click()
# %%
lines = driver.find_elements_by_css_selector("div.c-modal__content ul > li")
tables = driver.find_elements_by_css_selector("div.c-modal__content table > tbody > tr")
# %%
for line in lines:
name = line.text.strip()
print(name)
for row in tables:
name, value = row.find_elements_by_css_selector('td')
print(name.text, value.text)
Editor is loading...