A powerful tool for scraping and analyzing Reddit community data, tracking growth metrics, and storing historical data. Built with Python and Playwright for reliable scraping.
- 🕸️ Scrape Reddit community leaderboards
- 📈 Track subreddit growth metrics (subscribers, active users)
- 🧮 Calculate engagement ratios and growth rates
- 🕰️ Maintain historical data with timestamps
- 🔄 Deduplication and data consistency
- 📁 JSON output with incremental updates
- Clone the repository:
git clone https://github.com/yourusername/reddit-scraper.git
cd reddit-scraper- Install dependencies:
pip install -r requirements.txt- Install Playwright browsers:
playwright installRun the script:
python subreddits_to_scrape.py- Scrape first page only
- Scrape first 50 pages
- Scrape first 250 pages
- Scrape first 1000 pages
- Exit
The script will create/update subreddits.json with the scraped data.
The output JSON contains the following fields for each subreddit:
{
"id": "t5_2qh33",
"name": "r/funny",
"active_users": 2247,
"icon_url": "https://example.com/icon.png",
"description": "Community description",
"subscribers": 65970936,
"scraped_at": "2025-01-15T00:50:06.633",
"previous_subscribers": 65950000,
"previous_active_users": 2200,
"subscriber_growth_rate": 0.000317,
"active_user_growth_rate": 0.02136,
"engagement_ratio": 0.000034,
"scrape_count": 15,
"first_seen": "2025-01-01T12:00:00",
"last_updated": "2025-01-15T00:50:06.633"
}- Add scheduled scraping functionality
- Implement PostgreSQL integration for structured storage
- Add vector database support (e.g., Pinecone, Weaviate)
- Create API endpoints for data access
- Add NSFW detection and filtering
- Implement language detection and analysis
- Add sentiment analysis for descriptions
- Create community health scores
- Add trend analysis and forecasting
- Implement community clustering
- Add anomaly detection for unusual growth
- Add data validation and cleaning
- Implement data partitioning
- Add data compression for large datasets
- Create data export functionality
- Build web dashboard
- Add data visualization
- Create CLI interface
- Add progress tracking
- Predict future growth trends
- Detect emerging communities
- Implement recommendation system
- Add content classification
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
MIT License
This project is for personal/educational use only. The developers are not responsible for:
- Any legal issues arising from the use of this software
- Any damage caused by improper use
- Any violations of Reddit's terms of service
Please use responsibly and respect Reddit's API usage policies.
For issues and feature requests, please open an issue on GitHub.
