{"id":39701099,"url":"https://github.com/glowfi/reddit-scraper","last_synced_at":"2026-01-18T10:24:40.298Z","repository":{"id":222036881,"uuid":"756070584","full_name":"glowfi/reddit-scraper","owner":"glowfi","description":"A lightweight, beginner-friendly tool for collecting Reddit posts and comments with ease. Fast setup, clean code, and perfect for data analysis, research, or automation experiments.","archived":false,"fork":false,"pushed_at":"2025-11-30T15:40:56.000Z","size":2809,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-02T22:38:44.905Z","etag":null,"topics":["asyncio","asyncpraw","python3","reddit","reddit-api","reddit-scraper","requests","social-media"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glowfi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-11T22:07:01.000Z","updated_at":"2025-11-30T15:41:00.000Z","dependencies_parsed_at":"2024-02-11T23:24:04.327Z","dependency_job_id":"fe523df1-9f27-45c5-b41e-d36667111556","html_url":"https://github.com/glowfi/reddit-scraper","commit_stats":null,"previous_names":["glowfi/vox_populi_data_scrapper","glowfi/reddit_data_scrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glowfi/reddit-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glowfi%2Freddit-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glowfi%2Freddit-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glowfi%2Freddit-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glowfi%2Freddit-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glowfi","download_url":"https://codeload.github.com/glowfi/reddit-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glowfi%2Freddit-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","asyncpraw","python3","reddit","reddit-api","reddit-scraper","requests","social-media"],"created_at":"2026-01-18T10:24:39.757Z","updated_at":"2026-01-18T10:24:40.285Z","avatar_url":"https://github.com/glowfi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit Scraper\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/logo.png\" alt=\"Project Logo\" width=400/\u003e\n\u003c/p\u003e\n\nA modular Reddit scraping tool that collects data about **subreddits**, **posts**, and **users**, and exports everything as structured **JSON** files for easy processing or database import.\n\n---\n\n## 🚀 Features\n\n- Scrapes:\n    - ✔️ Subreddits\n    - ✔️ Posts\n    - ✔️ Users (kindof)\n\n- Outputs clean, structured **JSON** data\n- Includes tools to:\n    - Split large JSON files into smaller chunks\n    - Import JSON data into MongoDB\n\n- Fully automated workflow via `run.py`\n\n---\n\n## 📦 Dependencies\n\n- **Python 3.9+**\n- Packages listed in `requirements.txt`\n\n---\n\n## 📂 Output Data Structure\n\n\u003e Sample JSON file sizes are big about 16-25mb each ,download them as browser will take time to load them.\n\n### **Subreddit document example**\n\n![Subreddit example](./images/subreddits.png)\n\nSample JSON:\n[https://files.catbox.moe/r7a7um.json](https://files.catbox.moe/r7a7um.json)\n\n### **Post document example**\n\n![Post example](./images/posts.png)\n\nSample JSON:\n[https://files.catbox.moe/5cf2xw.json](https://files.catbox.moe/5cf2xw.json)\n\n### **User document example**\n\n![User example](./images/users.png)\n\nSample JSON:\n[https://files.catbox.moe/yp506n.json](https://files.catbox.moe/yp506n.json)\n\n---\n\n## 🛠️ Script Overview\n\n| Script                            | Description                                         |\n| --------------------------------- | --------------------------------------------------- |\n| `subreddits.py`                   | Scrapes subreddit metadata                          |\n| `posts.py`                        | Scrapes posts from each subreddit                   |\n| `users.py`                        | Scrapes user information                            |\n| `utils/split.py`                  | Splits large JSON files into import-friendly chunks |\n| `utils/import_data_to_mongodb.sh` | Imports JSON chunks into MongoDB                    |\n| `run.py`                          | Runs all scrapers sequentially                      |\n\n---\n\n## ⚙️ Installation \u0026 Setup\n\n### 1. Clone the repository \u0026 create a virtual environment\n\n```sh\npip install virtualenv\ngit clone https://github.com/glowfi/reddit-scraper\ncd reddit-scraper\n\npython -m venv env\nsource env/bin/activate   # Linux / macOS\n# or: env\\Scripts\\activate  # Windows PowerShell\n\npip install -r requirements.txt\n```\n\n---\n\n### 2. Configure environment variables\n\nEdit the file **`env-sample`**, then rename it to **`.env`**:\n\n```env\nusername=\u003cRedditUsername\u003e\npassword=\u003cRedditPassword\u003e\nclient_id=\u003cReddit API Client ID\u003e\nclient_secret=\u003cReddit API Client Secret\u003e\n\nTOTAL_SUBREDDITS_PER_TOPICS=6\nSUBREDDIT_SORT_FILTER=\"hot\"\nPOSTS_PER_SUBREDDIT=10\nPOSTS_SORT_FILTER=\"new\"\n```\n\n\u003e Ensure your Reddit app is created at:\n\u003e [https://www.reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)\n\n---\n\n### 3. Run the scraper\n\n```sh\n./run.py\n```\n\nThis will:\n\n1. Scrape subreddits\n2. Scrape posts\n3. Scrape users\n4. Save all data in this directory\n5. (Optional) Split files for MongoDB import\n\n---\n\n## 🗄️ Importing Data Into MongoDB\n\nAfter scraping, use the helper script:\n\n```sh\n./utils/import_data_to_mongodb.sh\n```\n\nMake sure your MongoDB service is running beforehand.\n\n---\n\n## 💡 Notes\n\n- API limits apply; use reasonable configuration values\n- Scraping speed depends on your network \u0026 Reddit API rate limiting\n- JSON outputs are ready for further processing (ML, analytics, etc.)\n\n---\n\n## 🤝 Contributing\n\nPull requests, issue reports, and improvements are welcome!\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglowfi%2Freddit-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglowfi%2Freddit-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglowfi%2Freddit-scraper/lists"}