For new data generation Semi-supervised-sequence-learning-Project we have writtern a python script to fetch📊, data from the 💻, imdb website 🌐 and converted into txt files.
Enhanced the listing of products into the csv file.
167
Description
Enhanced the script (pull request #167) to scrape product listings and prices from Amazon for specified categories (Laptop, Phones, Printers, etc.) and save them into a structured CSV file (prod_listings.csv). Each entry includes the category, product name, and price.
Type of PR
[X] Feature enhancement
Changes Made
for name in names:products, prices = product_listing(name)all_product_listings.extend(products)all_product_prices.extend(prices)category.extend([name] * len(products)) # Extend category list with repeated entries for each product
Checklist:
[X] I have performed a self-review of my code
[X] I have read and followed the Contribution Guidelines.
[X] I have tested the changes thoroughly before submitting this pull request.
[X] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[X] I have commented my code, particularly in hard-to-understand areas.
Additional context:
The script now uses Selenium to scrape Amazon for multiple product categories, captures both product names and prices, and organizes the data into a CSV file format for easy analysis.
Explanation:
• Enhanced Script: Modified the existing script (from pull request #167) to iterate over a list of predefined product categories, scrape product names and prices using Selenium, and save the data into a structured CSV file.
• Data Organization: Each row in the CSV file contains three columns: Category, Product Name, and Price, making it easy to analyze and compare product listings across different categories.
• WebDriver Usage: Utilized WebDriver (ChromeDriver) to automate browsing tasks, handle dynamic content loading, and ensure accurate data extraction from Amazon’s search results.
Enhanced the listing of products into the csv file.
167
Description
Enhanced the script (pull request #167) to scrape product listings and prices from Amazon for specified categories (Laptop, Phones, Printers, etc.) and save them into a structured CSV file (prod_listings.csv). Each entry includes the category, product name, and price.
Type of PR
Changes Made
for name in names:
products, prices = product_listing(name)
all_product_listings.extend(products)
all_product_prices.extend(prices)
category.extend([name] * len(products)) # Extend category list with repeated entries for each product
Checklist:
Additional context:
The script now uses Selenium to scrape Amazon for multiple product categories, captures both product names and prices, and organizes the data into a CSV file format for easy analysis.
Explanation: