Objective
What you're building
The first real automation: a script that scans Reddit for your niche and returns genuinely usable video topics — not just "whatever's hot," filtered for what actually makes a good 60-90 second video.
Scanning with PRAW
import praw
reddit = praw.Reddit(
client_id=os.environ["REDDIT_CLIENT_ID"],
client_secret=os.environ["REDDIT_CLIENT_SECRET"],
user_agent="faceless-channel-topic-finder/1.0",
)
def scan_niche(subreddit_name: str, limit: int = 20) -> list[dict]:
subreddit = reddit.subreddit(subreddit_name)
posts = []
for post in subreddit.hot(limit=limit):
posts.append({"title": post.title, "score": post.score, "num_comments": post.num_comments, "url": post.url})
return posts
hot() (not top() or new()) balances recency with engagement -- exactly the signal you want for "what's resonating with this community right now," which is a better proxy for video-worthy topics than pure recency (new) or all-time popularity (top, which might surface a post from 3 years ago).
Not every hot post is a good video topic
Filter for video potential, not just engagement
A hot post that's a meme image, a highly localized discussion, or something requiring deep prior context to understand doesn't translate to a 60-90 second standalone video -- even if it has a high score. Filter titles for ones that pose a clear question, state a surprising fact, or describe a specific, self-contained topic a viewer with zero context could follow.
def filter_for_video_potential(posts: list[dict], min_score: int = 100) -> list[dict]:
good_topics = []
for post in posts:
if post["score"] < min_score:
continue
if len(post["title"]) < 20 or len(post["title"]) > 150:
continue # too short to be substantive, or too long/complex for a title
good_topics.append(post)
return good_topics
This is a starting heuristic, not a finished filter -- run it against your real niche and look at what got through vs. filtered out. If genuinely good topics are getting filtered, or genuinely bad ones are passing, tune the thresholds. The point of testing against real data (not assuming the filter works) applies here exactly as it has everywhere else in this curriculum.
Deduplication and the topic queue
Your topic finder runs daily and keeps returning the same top Reddit post 3 days in a row (it's still "hot"). Without deduplication, what happens to your video output?
Reddit's "hot" ranking can keep a genuinely popular post near the top for days, and without checking against a record of already-used topics, your pipeline would happily generate near-identical videos. A persistent topic queue that tracks what's already been made into a video (checked before adding a new topic to the queue) is a small addition that prevents a real, visible quality problem.
What you're building today
topic_finder.py: scans your niche's subreddit(s), filters for video-worthy topics, deduplicates against a persistent topic_queue.json, and returns 5 usable topics — run for real and verified the 5 topics are genuinely different from each other and from any prior run.