Change default content source from 'user' to 'trending'#6
Conversation
…mmunity posts Agent-Logs-Url: https://github.com/thaitien280401-stack/RedditVideoMakerBot/sessions/95324e20-c917-455f-9c54-fde037e8005b Co-authored-by: thaitien280401-stack <271128961+thaitien280401-stack@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the app’s out-of-the-box behavior to fetch public Threads content by default by switching the default content source from "user" to "trending", while keeping the existing fallback behavior intact.
Changes:
- Change default
sourcein the config template to"trending"and update its explanation/example. - Change the hardcoded fallback default in
get_threads_posts()to"trending".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| utils/.config.template.toml | Sets default source to "trending" in the template and updates user-facing explanation. |
| threads/threads_client.py | Updates the code-side default source used when config doesn’t specify one. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| min_comments = int(thread_config.get("min_comments", 5)) | ||
| source = thread_config.get("source", "user") | ||
| source = thread_config.get("source", "trending") | ||
|
|
There was a problem hiding this comment.
source fallback default has been changed to "trending", but later in this same function the section header comment still says Source: user (mặc định) (around the # Source: user ... block). Please update that comment to avoid misleading future readers about the actual default source selection.
Default content source was
"user"(fetches from a specific user's profile). Changed to"trending"so the app fetches public trending posts from communities out of the box.Fallback chain
trending → google_trends → useris unchanged — if trending scraping fails, it degrades gracefully.utils/.config.template.toml: Defaultsource→"trending", updated explanationthreads/threads_client.py: Hardcoded fallback default inget_threads_posts()→"trending"Users can still set
source = "user"explicitly inconfig.tomlto restore old behavior.