-
Scrape product specifications, images, shipping details -Amazon Brazil -Python
To scrape product specifications from Amazon Brazil, use Selenium to locate the product details section, often formatted as a table or list. Extract the specifications using find_elements and iterate through the rows or items to collect the data.
from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.get('https://www.amazon.com.br/dp/product-page') # Scrape specifications specs = driver.find_elements(By.CSS_SELECTOR, '.product-specs tr') for spec in specs: key = spec.find_element(By.CSS_SELECTOR, 'th').text value = spec.find_element(By.CSS_SELECTOR, 'td').text print(f"{key}: {value}") driver.quit()
Log in to reply.