Commit 7e4e72b
committed
Add comprehensive Reddit fetcher module with PRAW integration
This commit adds a complete Reddit post fetching module for video script generation:
Features:
- RedditFetcher class with PRAW integration for fetching posts
- Fetch posts by ID, URL, or from subreddits
- Extract comprehensive post data (title, body, comments, media, awards, metadata)
- Configurable options for comment limits, sorting, and filtering
- Media extraction support (images, videos, galleries, external links)
- Clean text processing for video script generation
- JSON export functionality
- Custom error handling with specific exception types
Files added:
- reddit_fetcher.py: Main module with RedditFetcher class
- reddit_config.py: Configuration file for API credentials and options
- examples/reddit_fetcher_example.py: Comprehensive usage examples
- REDDIT_FETCHER_README.md: Full documentation and usage guide
- .env.example: Environment variable template
- .gitignore: Git ignore file to protect credentials
Dependencies:
- Added praw>=7.7.1 for Reddit API access
- Added prawcore>=2.3.0 for API core functionality
- Added python-dotenv>=1.0.0 for environment variable support
- Added requests>=2.31.0 for HTTP requests1 parent 2ac6d64 commit 7e4e72b
File tree
7 files changed
+1361
-1
lines changed- examples
7 files changed
+1361
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments