I Taught Python To Write Fanfiction Using Reddit Comments And It Got Weird Fast

I had a completely normal idea the other night:
“What if I trained a Python script to write weird fanfiction using only Reddit comments?”
Not GPT. Not deep learning. Just basic Python and a chaotic mix of libraries. Like some kind of cursed Mad Libs on steroids.
And that’s what I built.
By the end of this tutorial, you’ll know how to:
- Scrape Reddit comments on any topic
- Build bizarre sentence generators
- Auto-create short fanfics from random noise
- Cry-laugh at what your own script spits out
Let’s get weird.
???? Step 1: Scraping Reddit Comments
To start, I grabbed a pile of raw comments using praw
, the Reddit API wrapper.
pip install praw
import praw
reddit = praw.Reddit(
client_id="YOUR_ID",
client_secret="YOUR_SECRET",
user_agent="FanficBot"
)
comments = []
for comment in reddit.subreddit("writingprompts").comments(limit=500):
comments.append(comment.body)
Now I had 500+ bizarre Reddit snippets. You can change the subreddit to anything from r/relationships
to r/showerthoughts
if you want flavor.
Or just grab the trending Python stuff from here and turn it into code poetry. That’s fun too.
???? Step 2: Generating Sentences Like a Deranged AI
Next, I made a sentence mixer using markovify
:
pip install markovify
import markovify
text_model = markovify.Text(" ".join(comments))
for i in range(5):
print(text_model.make_sentence())
Output:
She looked at me and screamed, “You absolute unit!”
That was the last time I gave advice about werewolves.
The toaster wasn’t ready for this level of betrayal.
Are these sentences meaningful? Not at all.
Are they fantastic fuel for nonsense fanfiction? Absolutely.
✍️ Step 3: Writing the Fanfic
Time to make our bot write like it’s on a sugar high.
def generate_fanfic():
intro = text_model.make_sentence()
conflict = text_model.make_sentence()
twist = text_model.make_sentence()
ending = text_model.make_sentence()
return f"{intro}\n\n{conflict}\n\nSuddenly, {twist}\n\nAnd then...\n{ending}"
print(generate_fanfic())
Boom. Your first Python-powered fanfic. It’s probably about space dragons and emotional toasters.
Want a more structured build with better NLP ideas? I always peek at developer resources here to level things up.
????️ Step 4: Save and Share
Let’s save your masterpiece to a file and automatically tweet it.
pip install tweepy
import tweepy
client = tweepy.Client(bearer_token="YOUR_TOKEN")
client.create_tweet(text=generate_fanfic())
Your fanfic bot is now a Twitter menace. You're welcome.
(Just don't forget to set up rate limits, or you'll spam yourself into oblivion.)
???? Bonus: Give It a Web Interface
Want to share your bot? Use Flask
to turn it into a web toy. I won’t drop the whole server code here, but it’s pretty easy.
And if you want something ready to deploy, check out the trending Python repos — there’s always some weird web wrapper to fork.
???? What I Learned
This silly side project taught me:
- Text is more fun when it’s broken
- Python isn’t just about scraping and automation
- Quirky tools = creative power-ups
And honestly? Building a fanfic bot is way more fun than another task manager app.
If you're tired of doing what the docs say, explore weird Python ideas. I keep all my favorite chaos-fueled tools bookmarked at:
???? Try This Yourself
Try this tonight:
- Pick a weird subreddit
- Feed the chaos into
markovify
- See what your Python script dreams up
If your script writes something too good, please share it. Or print it, bind it, and sell it on Etsy.
Python will never judge you. Neither will I.
Maybe the toaster will.
Would you like the full repo for this one too? Want more oddball project ideas? Let me know in the comments ????
???? Download Free Giveaway Products
We love sharing valuable resources with the community! Grab these free cheat sheets and level up your skills today. No strings attached — just pure knowledge! ????
- Free ARPing Cheat Sheet: Expert Diagnostics, Bulletproof Security & Effortless Automation!
- Master Apache2 on Kali Linux — Your Complete Guide to Setup, Security, and Optimization (FREE Cheat Sheet) ????
- The Ultimate OWASP Amass Cheat Sheet – Master Recon in Minutes! ????
- Hidden Subdomains in Seconds! ???? The Ultimate Assetfinder Cheat Sheet (FREE Download)
- Hack Apple Devices' BLE Data? Master Apple BLEEE with This FREE Cheat Sheet!
- Stealth Tracerouting with 0trace – The Ultimate Cheat Sheet!
- STOP Hackers in Their Tracks: The Ultimate ARPWATCH Cheat Sheet (FREE Download)
- Hack Any Network in Seconds: The Ultimate ARP-Scan Cheat Sheet for Cyber Professionals
- Nmap - Cheat Sheet - For Beginners/Script Kiddies
- Master atftp with This Comprehensive Cheat Sheet!
???? More Free Giveaway Products Available Here
We’ve got 20+ products — all FREE. Just grab them. We promise you’ll learn something from each one.
???? Actionable Kits & Resources to Build Your Business Faster
- ???? ???? 8 Side Hustle Blueprint Kits – $95 Value for $69! (Save 27% Today)
- ???? 20 Premium Guides for $69 (Was $180) – Save 61% Today!
- ???? $120 Worth of 40 Info Playbooks – Yours for Just $69 (Save 42%!)
- ???? 15 Side Hustle Kits for $69 (Was $150) – Save 54%!
- ???? ???? Complete Cheat Sheet Vault – 30 Tools, 73% Off Right Now!
- ???? ???? 10 Marketing Guide Bundles for $69 (Was $200) – Save 65%!
Explore the full shop here: Visit 0x7bshop on Gumroad
Turn $0 Research Papers into $297 Digital Products
???? Convert Research Papers into Business Tools The Ultimate Shortcut to Building Digital Products That Actually MatterMost people scroll past groundbreaking ideas every day and never realize it.They're hidden in research papers.Buried under academic jargon.Collecting digital dust on arXiv and Google Scholar.But if you can read between the lines —you can build something real.Something useful.Something valuable.This is not another fluffy eBook.This is a system to extract gold from research……and turn it into digital tools that sell.Here's what you get: ✅ Step-by-Step GuideLearn how to find high-impact papers and convert them into cheat sheets, prompt packs, and playbooks. ✅ Plug-and-Play ChecklistNo thinking required. Follow the steps, build your product, publish it. ✅ ChatGPT Prompt PackGet the exact prompts to decode complex research, turn insights into product formats, and even write your sales copy. ✅ Mindmap WorkflowA visual blueprint of the whole process. From idea to income — laid out like a circuit. Why this matters:Most people are drowning in low-quality content.You’re about to do the opposite.You're going to create signal — not noise.You’ll build products that are: Research-backed Fast to create High in perceived value And designed to help people win It’s a full loop: You learn → You create → Others win → You profit.What happens when you buy?You’ll feel it.The clarity.The power of execution.The momentum of turning raw knowledge into real-world value.You’re not buying a file.You’re buying a shortcut to products that earn, not just exist.If that excites you — let’s get started.No code. No waiting. Just results.???? Grab your copy now.
Take ideas from research papers and turn them into simple, helpful products people want.
Here’s what’s inside:
- Step-by-Step Guide: Go from idea to finished product without getting stuck.
- Checklist: Follow clear steps—no guessing.
- ChatGPT Prompts: Ask smart, write better, stay clear.
- Mindmap: See the full flow from idea to cash.
Make products that are smart, useful, and actually get attention.
No coding. No waiting. Just stuff that works.