Add threads/google_trends.py module that:
- Fetches trending keywords from Google Trends RSS feed (geo=VN)
- Searches Threads posts by keyword using Playwright
- Returns matched thread posts for video creation
Update threads/threads_client.py:
- Add _get_google_trends_content() as new content source
- Add Google Trends as fallback: trending → google_trends → user
- Add Google Trends fallback when user threads also fails
Update config template with "google_trends" source option.
Agent-Logs-Url: https://github.com/thaitien280401-stack/RedditVideoMakerBot/sessions/b3d8248e-4f90-4f82-baef-11a251967a3b
Co-authored-by: thaitien280401-stack <271128961+thaitien280401-stack@users.noreply.github.com>
- Add ThreadsAPIError exception class for clear error typing
- Add validate_token() method to check token via /me endpoint before fetching
- Add automatic token refresh attempt when validation fails
- Add retry logic with backoff for transient connection/timeout failures
- Add API error body detection (Meta API can return 200 with error in body)
- Add request timeout (30s) to prevent hanging
- Fix keyword filtering to fall back to unfiltered list when all are filtered out
- Add detailed diagnostic messages with user_id, permission hints, and URLs
- Handle ThreadsAPIError separately in main.py for targeted troubleshooting guidance
- Remove unused Authorization header (Threads API uses access_token query param)
Agent-Logs-Url: https://github.com/thaitien280401-stack/RedditVideoMakerBot/sessions/0fff9f19-a7aa-44c2-a703-9e5a7ec6d880
Co-authored-by: thaitien280401-stack <271128961+thaitien280401-stack@users.noreply.github.com>
- Changed default cron from every 6h to every 3h (8 videos/day)
- Added utils/title_history.py: tracks used titles in JSON
- threads_client.py: skips threads with already-used titles
- scheduler/pipeline.py: saves title after successful video creation
- main.py: saves title in manual mode too
- Updated config template with new scheduler defaults
Agent-Logs-Url: https://github.com/thaitien280401-stack/RedditVideoMakerBot/sessions/17c7c41c-cf86-4279-88b8-01cba23ee763
Co-authored-by: thaitien280401-stack <271128961+thaitien280401-stack@users.noreply.github.com>