Forum Replies Created

  • To scrape seller information from Americanas Brazil, you can use Selenium to locate the seller’s details, which are often displayed as text or in a separate section. By targeting the seller’s name, contact info, or ratings, you can collect this data for each product. Be sure to handle cases where the seller information may not be available for every listing.

    from selenium import webdriver
    # Set up the WebDriver
    driver = webdriver.Chrome()
    # Open the product page
    driver.get('https://www.americanas.com.br/produto-page')
    # Scrape seller information
    seller = driver.find_element_by_css_selector('.seller-info .seller-name').text
    print('Seller Name:', seller)
    driver.quit()
    
  • To scrape the rating from Mercado Livre Brazil, you’ll need to target the element that holds the product’s rating. Ratings are often displayed as star icons or a numeric value. You can use Puppeteer to select the span or div containing the rating and extract it once the page is fully loaded.

    const puppeteer = require('puppeteer');
    (async () => {
        // Open browser and visit product page
        const browser = await puppeteer.launch({ headless: true });
        const page = await browser.newPage();
        await page.goto('https://www.mercadolivre.com.br/product-page');
        // Extract the product rating
        const rating = await page.$eval('.rating-stars', el => el.getAttribute('aria-label'));
        console.log('Product Rating:', rating);
        await browser.close();
    })();