How hazeishere/news-what-taiwan works
Project type and purpose
• This is a full-stack web application built with Flask (Python) on the back end and Bootstrap/Jinja2 templates on the front end.
• It scrapes Yahoo Taiwan News, stores the raw articles, and then uses an AI model (via the g4f library) to generate humorous translations, summaries, sentiment analysis, keyword extraction, and core takeaways.
File structure
• Top-level:
• app.py – main Flask application (routes, controllers)
• requirements.txt – Python dependencies
• templates/ – Jinja2 HTML views: index.html, article.html, crawling.html, debug.html, introduction.html, rate_limit.html, settings.html
• images/ – static assets (screenshots)
• No dedicated “static” folder is listed, but Bootstrap/JS likely served via CDN.
• There is an implicit data store (articles.json noted in README) for persisting scraped articles.
• Key patterns: MVC-style separation (app.py = controllers/models; templates = views), service modules for scraping and AI calls.
README for insights
• Backend stack: Flask + BeautifulSoup + Requests + g4f
• Frontend stack: HTML/CSS/Bootstrap/JavaScript
• Runtime flow: user triggers “crawl” → scraper fetches articles → stores in JSON → user clicks an article → AI service invoked → results rendered.