Add TermScrape: Complete terminal-based web scraper with LLM support#1
Open
serhat961 wants to merge 1 commit into
Open
Add TermScrape: Complete terminal-based web scraper with LLM support#1serhat961 wants to merge 1 commit into
serhat961 wants to merge 1 commit into
Conversation
Implemented a comprehensive web scraping tool with the following features: Core Components: - Single URL scraping with multiple output formats (markdown, JSON, text) - Recursive website crawling with configurable depth limits - JavaScript rendering support via Playwright headless browser - LLM-based data extraction using local Ollama models - HTML parsing and conversion to structured formats Modules: - src/main.py: Click-based CLI interface with scrape and crawl commands - src/scraper.py: Single URL scraping with requests and error handling - src/crawler.py: Queue-based recursive crawling with depth control - src/parser.py: HTML parsing, markdown conversion, structured JSON extraction - src/browser.py: Async Playwright integration for JavaScript rendering - src/llm_extract.py: Ollama integration for AI-powered extraction - src/utils.py: Robots.txt checking, delays, logging, URL validation Ethical Features: - Automatic robots.txt compliance - Random delays (1-5s) between requests - Proper User-Agent identification - Configurable rate limiting Testing & Documentation: - Pytest test suite for scraper and crawler - Comprehensive usage guide and API documentation - Contributing guidelines with code standards - Example scripts demonstrating library usage Configuration: - requirements.txt with all dependencies - pyproject.toml for packaging and distribution - MIT License - .gitignore for Python projects The tool is production-ready and follows PEP8 standards with type hints, modular design, and robust error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented a comprehensive web scraping tool with the following features:
Core Components:
Modules:
Ethical Features:
Testing & Documentation:
Configuration:
The tool is production-ready and follows PEP8 standards with type hints, modular design, and robust error handling.