📰 Comprehensive News Handling
- Scrapes news from multiple sources.
- Summarizes articles using advanced LLMs.
- Dispatches news summaries to various channels.
🧠 Powered by Large Language Models
- Utilizes state-of-the-art LLMs for summarization.
- Configurable to use different providers (e.g., OpenAI, OpenRouter).
📦 Modular Design
- Easy to extend with custom scrapers and summarizers.
- Clean and well-documented API.
Note: Package not yet published
pip install newsllm
from newsllm.services.scraper import HackerNewsScraper
from newsllm.services.summarizer import Summarizer
# Initialize the scraper
scraper = HackerNewsScraper()
# Initialize the summarizer
summarizer = Summarizer()
# Scrape the top stories from HackerNews
import asyncio
loop = asyncio.get_event_loop()
news_list = loop.run_until_complete(scraper.scrape())
# Print the scraped news
for news in news_list:
summary_dict = summarizer.summarize(news.text_content)
news.summary = summary_dict.get("summary", "")
news.tags = summary_dict.get("tags", [])
If you find a bug 🐛, please open a bug report. If you have an idea for an improvement or new feature 🚀, please open a feature request.