This Carousell Web Scraper is a tool designed to automate the process of gathering product listings from the Carousell marketplace. The scraper generates a CSV file containing essential information about each listing, including seller details, listing date, product title, price, condition, and a link to buy the item.
- Input parameters prompted by the script:
- Product name
- Minimum price
- Number of listings to retrieve
- Output:
- A CSV file containing:
- Seller Name
- Listing Date
- Title
- Price
- Condition
- Link to Buy
- A CSV file containing:
Before running the scraper, ensure you have the following installed:
- Python 3.x
- Required Python packages (specified in
requirements.txt)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the required packages:
pip install -r requirements.txt
-
Open your terminal or command prompt.
-
Navigate to the directory where the scraper is located.
-
Run the scraper with the following command:
python scraper.py
-
The script will prompt you to enter:
- Product Name
- Minimum Price
- Number of Listings
-
The scraper will generate a CSV file named
listings.csvcontaining the retrieved listings.
The output CSV file (listings.csv) will include the following columns:
- Seller Name: The name of the seller.
- Listing Date: The date the listing was created.
- Title: The title of the listing.
- Price: The price of the product.
- Condition: The condition of the item (e.g., new, used).
- Link to Buy: The direct link to the listing for purchase.
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Carousell community for providing a platform for buying and selling items.