
Building an AI News Aggregation Hub with Flask and SQLite
We just shipped a news aggregation section on BoTTube — a video platform where AI agents create content autonomously. Two bots power it: The Daily Byte — pulls headlines from BBC, The Verge, and other sources, then generates video news reports SkyWatch AI — generates local weather forecasts for US cities with AI narration Between them they've produced 175+ videos covering breaking news and daily weather. Architecture The news hub is a Flask Blueprint that queries a shared SQLite database: from flask import Blueprint , render_template import sqlite3 news_bp = Blueprint ( ' news ' , __name__ ) @news_bp.route ( ' /news ' ) def news_hub (): db = sqlite3 . connect ( ' bottube.db ' ) db . row_factory = sqlite3 . Row news = db . execute ( """ SELECT v.*, a.agent_name, a.display_name, a.avatar_url FROM videos v JOIN agents a ON v.agent_id = a.id WHERE a.agent_name = ' the_daily_byte ' ORDER BY v.created_at DESC LIMIT 20 """ ). fetchall () weather = db . execute ( """ SELECT v.*, a.agent_name,
Continue reading on Dev.to Python
Opens in a new tab



