Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

✨ BLOGGY — AI-Powered YouTube to Blog Generator

Welcome to Bloggy — a powerful FastAPI service that automatically converts YouTube video content into long-form, SEO-optimized, human-like blog posts using AI.

🔗 GitHub Repository: github.com/kenosis01/Bloggy
💡 Developed by: Kenosis


🚀 Features

  • 🎥 Generate blog posts from:
    • A specific YouTube video URL, or
    • A random video from a YouTube channel
  • 🗣️ Automatically fetches transcripts using youtranscripts.com
  • 📌 Retrieves video title automatically
  • 🧠 Uses AI (via Pollinations) to write detailed, SEO-friendly blog posts
  • 🖼️ Includes YouTube video thumbnail in the blog
  • 📄 Markdown blog post created and uploaded to Uguu.se (temporary hosting, 60-minute expiry)
  • 💾 All in-memory — no disk writes, clean and efficient
  • ⚡ FastAPI-powered REST API
  • 🌑 Includes dark-themed frontend UI (optional)
  • 📜 Full API documentation in /docs tab (or via included frontend)

📥 Clone and Run the Project

1. Clone the Repository

git clone https://github.com/kenosis01/Bloggy.git
cd Bloggy

2. Install Dependencies

Make sure you have Python 3.8+ installed.

pip install -r requirements.txt

Or manually install:

pip install fastapi uvicorn requests scrapetube

3. Run the Server

uvicorn main:app --reload

By default, the app will run at:

http://localhost:10000

🔌 API Usage

Endpoint: POST /v1/blog/generate

Generate a blog post from either a video URL or a channel ID.


✅ Request Format

You must provide only one of the following:

{
  "video_url": "https://www.youtube.com/watch?v=abc123xyz",
  "channel_id": null
}

Or:

{
  "video_url": null,
  "channel_id": "UCxxxxxxxxxxxxxxxx"
}

❗ Rules:

  • You must only send one of the two fields.
  • If both or neither are provided, the API returns an error.

🔁 Successful Response

{
  "status": "success",
  "video_url": "https://youtube.com/watch?v=abc123xyz",
  "title": "This is the YouTube video title",
  "thumbnail": "https://img.youtube.com/vi/abc123xyz/maxresdefault.jpg",
  "file_url": "https://h.uguu.se/generated-blog.md"
}

The file_url is a downloadable .md file containing the AI-generated blog post.


❌ Error Response

{
  "detail": "Exactly one of video_url or channel_id must be provided."
}

📦 File Upload Info

  • The blog post is converted into a .md Markdown file.
  • It is uploaded to https://uguu.se using their public API.
  • Files are automatically deleted after 60 minutes.
  • No files are saved to your local disk — everything is done in-memory using io.BytesIO.

🧠 How It Works (Pipeline)

  1. User provides a video URL or a channel ID
  2. App fetches video ID
  3. App extracts transcript from youtranscripts.com
  4. Video title is fetched from aitubetool.com
  5. Transcript is sent to Pollinations AI
  6. AI generates a complete blog post
  7. The blog post is wrapped in Markdown with the video thumbnail
  8. Markdown file is uploaded to Uguu and download link is returned

📄 Sample Output Markdown

---
layout: post
title: "Exploring the Future of AI"
date: 2025-09-11T10:23:00
---

![Video Thumbnail](https://img.youtube.com/vi/abc123xyz/maxresdefault.jpg)

Artificial Intelligence is rapidly evolving...

🧍‍♂️ Developed By

Kenosis
🔗 BuyMeACoffee – Support the Project


🛠️ Future Improvements

  • Add multilingual translation (e.g., Hindi, Spanish)
  • Better error messages with context
  • Support for playlists or batch processing

🛡 License

This project is licensed under the MIT License.
Use freely, contribute respectfully.


About

Bloggy is a tool that converts Youtube to Blogpost easily

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages