DEV Community

Mumtaz Ali
Mumtaz Ali

Posted on

1

🛒 Amazon Scraper

Image description

Overview
Amazon Scraper is a Python-based project designed to extract product data from Amazon, such as titles, prices, reviews, and images. It features a Flask backend for handling data processing and a React frontend for displaying results. The scraper is powered by BeautifulSoup to efficiently gather data.

🚀 Features
Scrape Amazon product details using search queries.
Export data to JSON and CSV formats.
A Flask API to serve scraped data.
A React.js frontend for querying and displaying product data.

🏗️ Project Structure

amazon_scraper/
├── backend/
│   ├── app.py               # Flask application
│   ├── scraper.py           # Scraping logic
│   ├── utils.py             # Utility functions
│   ├── user_queries.json    # User input queries
│   ├── requirements.txt     # Backend dependencies
│   ├── output/              # Scraped data storage
│   └── vercel.json          # Backend deployment config
├── frontend/
│   ├── public/              # Static frontend files
│   ├── src/                 # React.js source files
│   ├── package.json         # Frontend dependencies
│   ├── .env                 # Environment variables
│   └── build/               # Production-ready frontend
Enter fullscreen mode Exit fullscreen mode

📦 Installation
Backend Setup
Clone the repository:

git clone https://github.com/engrmumtazali0112/python-script-amazon-scrape.git
cd amazon_scraper/backend
Enter fullscreen mode Exit fullscreen mode

Install dependencies:

pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Run the Flask server:

python app.py
Enter fullscreen mode Exit fullscreen mode

Access the backend at: http://127.0.0.1:5000

Frontend Setup
Navigate to the frontend directory:

cd ../frontend
Enter fullscreen mode Exit fullscreen mode

Install dependencies:

npm install
Enter fullscreen mode Exit fullscreen mode

Start the development server:

npm start
Enter fullscreen mode Exit fullscreen mode

🌐 Deployment
Backend Deployment
Ensure vercel.json is correctly configured.
Deploy to Vercel:

vercel --prod
Enter fullscreen mode Exit fullscreen mode

Frontend Deployment
Build the React app:

npm run build
Enter fullscreen mode Exit fullscreen mode

Deploy to Vercel:

vercel --prod
Enter fullscreen mode Exit fullscreen mode

🔗 Dependencies
Python 3.12
Flask
BeautifulSoup
React.js
Node.js
📜 License
This project is licensed under the MIT License.

📌 Follow Us

Made with ❤️ by Mumtaz Ali

Happy Coding! ✨

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay