Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🕷️ Web Scraper (Assignment for ExactSpace ) (Node.js + Python + Docker)

This project demonstrates how to scrape dynamic content from a website using Puppeteer (Node.js), and serve the scraped content using a Flask (Python) API. The full stack is containerized using a multi-stage Docker build to optimize size and performance.


📌 Features

  • Scrapes content (title, headings, paragraph, image, etc.) from any given URL
  • Uses Puppeteer with headless Chromium for dynamic web scraping
  • Serves the scraped JSON data via a Flask API
  • Built with Docker multi-stage build to keep the final image lean
  • Environment variable support for dynamic URLs

🗂️ Project Structure

web-scraper architecture

Setup Instructions (for runnning in local system )

Clone the repo and Install dependencies

  git clone https://github.com/Hemanthbugata/web-scraper.git

  cd node-scraper

  npm install 

  node scraper.js  (scraped data is stored in data.json)

  .env ( include the website URL for web scrapping) 
        SCRAPE_URL = " " 

  cd ../ python-datascraper

  requrirements.txt (Flask==2.2.5)

  pip install requriements.txt

  python server.py (displays the data stored in data.json on localhost)

Now in Root dir

After Dockerfile is coded.

docker build -t web-scraper . 

docker run -p 5000:5000 web-scraper (runs on a docker container) 

OUTPUT

image

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages