Setup Guide
Prerequisites
- Python 3.11+
- Reddit API credentials
- OpenAI API key
- Google Cloud service account
1. Clone Repository
bash
git clone https://github.com/your-username/reddit-crawler
cd reddit-crawler2. Reddit API Setup
- Go to reddit.com/prefs/apps
- Click "Create App"
- Select "script"
- Note your
client_idandclient_secret
3. Google Sheets Setup
- Create a Google Cloud project
- Enable Google Sheets API
- Create a service account
- Download JSON key file
- Create a Google Sheet
- Share the sheet with the service account email (Editor access)
Service Account Email
The email looks like: name@project.iam.gserviceaccount.com
4. Environment Variables
bash
cp .env.example .envEdit .env:
bash
# Reddit
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
REDDIT_USER_AGENT=YourApp/1.0
# OpenAI
OPENAI_API_KEY=your_openai_key
# Google
GOOGLE_SERVICE_ACCOUNT_FILE=/app/credentials/service_account.json5. Run
bash
# With Docker
docker-compose up -d
# Or directly
python -m app.main6. Verify
Check your Google Sheet. New rows should appear after the first crawl.