Skip to content

A compact starter for running Selenium-powered web scraping with Flask. Includes headless Chromium setup, ChromeDriver integration, and a simple example route. An easy base for browser automation, data extraction, or lightweight scraping services.

Notifications You must be signed in to change notification settings

asepscareer/selenium-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Flask

Deploy a lightweight Selenium + Flask scraper on Railway: headless Chromium, optimized Chrome flags, simple Flask route, and a clean blueprint for web scraping projects.

Deploy on Railway

Features

  • Headless Chromium + Chromedriver already installed

  • Chrome flags tuned for low-memory container environments

  • Simple Flask route (/scrape) as Selenium scraping example

  • Minimal and reproducible Dockerfile

  • $PORT-aware Flask server

Endpoints

Route Description
/ Basic health/status check
/scrape Example scraper using Selenium (scrapethissite.com)

File Structure

.
├── Dockerfile
├── main.py
└── requirements.txt

How It Works

  • Chromium & Chromedriver installed via apt
  • Headless Chrome launched with safe container flags
  • Selenium loads the webpage through controlled browser automation
  • Selenium retrieves page HTML directly for processing
  • Flask provides simple HTTP routes for triggering scrapes

Notes

  • Suitable as a base template for any Selenium + Flask scraping workflow
  • Add request throttling or queueing if workloads become heavy
  • Ideal for small-scale, browser-based scraping or automation tasks

About

A compact starter for running Selenium-powered web scraping with Flask. Includes headless Chromium setup, ChromeDriver integration, and a simple example route. An easy base for browser automation, data extraction, or lightweight scraping services.

Topics

Resources

Stars

Watchers

Forks