NewsCrap adalah alat scraping berita Google berbasis Command Line Interface (CLI) yang dirancang untuk riset, investigasi, dan pengumpulan data OSINT. Dengan fitur canggih seperti rotation proxy, scheduling otomatis, dan multi-format export, alat ini memudahkan pengumpulan data berita secara efisien dan andal.
- Multi-keyword Support - Cari dengan beberapa keyword sekaligus
- Pagination Scraping - Ambil artikel dari banyak halaman hasil
- Multi-format Export - CSV, JSON, SQLite database
- Proxy & User-Agent Rotation - Hindari deteksi dan blokir
- Scheduler Mode - Jalankan otomatis sesuai interval waktu
- Deduplication & Filtering - Hindari duplikat dan filter by domain
- Report Generation - Export laporan Markdown/HTML
- Verbose Logging - Pantau proses scraping secara detail
- Error Handling - Tetap berjalan meski ada error
- Clone Repository
git clone https://github.com/odaysec/NewsCrap.git
cd NewsCrap- Install Dependencies
pip install -r requirements.txt# Scrape berita dengan keyword tunggal
python news_scrap.py "artificial intelligence"
# Multiple keywords
python news_scrap.py "AI" "machine learning" "deep learning"
# Dengan batasan jumlah artikel
python news_scrap.py "cybersecurity" --max-articles 50# Export ke JSON dengan filter domain
python news_scrap.py "technology" --output-format json --domain-filter bbc.com
# Dengan proxy rotation dan user agent
python news_scrap.py "news" --proxy-file proxies.txt --user-agent-file user_agents.txt
# Mode terjadwal (setiap 2 jam)
python news_scrap.py "cryptocurrency" --schedule 2h --verbose
# Generate laporan HTML
python news_scrap.py "politics" --report-format html --max-articles 30usage: news_scrap.py [-h] [--max-articles MAX_ARTICLES] [--output-format {csv,json,sqlite,all}]
[--output-dir OUTPUT_DIR] [--report-format {markdown,html,both}]
[--proxy-file PROXY_FILE] [--user-agent-file USER_AGENT_FILE]
[--domain-filter DOMAIN_FILTER] [--schedule SCHEDULE] [--verbose]
keywords [keywords ...]
Google News Scraper CLI
positional arguments:
keywords Keywords to search for
optional arguments:
-h, --help show this help message and exit
--max-articles MAX_ARTICLES
Maximum articles per keyword (default: 10)
--output-format {csv,json,sqlite,all}
Output format (default: csv)
--output-dir OUTPUT_DIR
Output directory (default: output)
--report-format {markdown,html,both}
Generate report in specified format
--proxy-file PROXY_FILE
File containing list of proxies (one per line)
--user-agent-file USER_AGENT_FILE
File containing list of user agents (one per line)
--domain-filter DOMAIN_FILTER
Filter results by domain (e.g., bbc.com)
--schedule SCHEDULE Run on schedule (e.g., "1h" for hourly, "30m" for every 30 minutes)
--verbose, -v Verbose outputhttp://proxy1.example.com:8080
http://proxy2.example.com:3128
socks5://proxy3.example.com:1080
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
python news_scrap.py "climate change" "global warming" --max-articles 100 --output-format jsonpython news_scrap.py "company name" --domain-filter reuters.com --proxy-file proxies.txt --schedule 6hpython news_scrap.py "breaking news" --schedule 30m --report-format both --verbose- Gunakan tool ini secara bertanggung jawab dan patuhi Terms of Service Google
- Respect robots.txt dan rate limiting
- Disarankan menggunakan proxy untuk menghindari IP blocking
- Tool ini untuk tujuan edukasi dan research yang legal
Error: 429 Too Many Requests (gunakan proxy jangan lupa)
python news_scrap.py "keyword" --proxy-file proxies.txtError: Connection Issues
# Pastikan koneksi internet stabil
# Coba dengan user agent berbedaYour sponsor akan sangat berharga bagi saya dalam research project maupun aktifitas saya di OSS lebih lanjut. terimakasih banyak.
Made with ❤️ by OdaySec
⭐ Star this repository if you find it helpful!
Disclaimer: Tool ini dibuat untuk tujuan edukasi dan research. Pengguna bertanggung jawab penuh atas penggunaan tool ini sesuai dengan hukum yang berlaku dan kebijakan website yang di-scrape.