A simple, lightweight web scraper with a modern web UI — built using Go. Scrape content from your favorite websites using CSS selectors and view results in real-time with theme support.
- ⚡ Real-time scraping via CSS selectors
- 🌐 Predefined sites (e.g., Hacker News, Reddit Golang, GitHub Trending)
- 🌙 Dark/Light theme toggle
- � Copay selector for quick reuse
- 🧠 Smart fallback for missing selectors
- 📜 History of recently scraped URLs
- 🛠️ Built with Go and
goquery
-
Clone the repository
git clone https://github.com/GhanshyamJha05/WEB_SCRAPPER_Using-GO.git cd WEB_SCRAPPER_Using-GO -
Install dependencies Make sure you have Go installed. Then:
go mod tidy
-
Run the server
go run main.go
-
Access the scraper Open your browser and visit:
http://localhost:8080
-
Build the Docker image
docker build -t web-scraper . -
Run the container
docker run -p 8080:8080 web-scraper
-
Access the scraper Open your browser and visit:
http://localhost:8080
| Site | Tag | Example | CSS Selector |
|---|---|---|---|
| Hacker News | Tech News | Headlines | .titleline > a |
| Reddit Golang | Golang | Post titles | h3._eYtD2XCVieq6emjKBH3m |
| GitHub Trending | GitHub | Trending Repos | h2 a |
- Enter a URL and (optionally) a CSS selector.
- Click Scrape to fetch and display titles/links.
- View results styled in a readable layout.
- Toggle between light/dark themes.
- Try recommended sites or browse recently scraped URLs.
- Export results to JSON/CSV
- Pagination for large results
- Login/session-based scraping
- API endpoint for programmatic access
MIT License
© 2025 Ghanshyam Jha