feat: Implement complete RSS news fetching system with multi-source support
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""Quick test of core functionality"""
|
||||
import sys
|
||||
sys.path.append('backend')
|
||||
|
||||
print("🧪 Quick System Test")
|
||||
|
||||
# Test 1: News Fetching
|
||||
print("1. Testing news fetching...")
|
||||
from news_fetcher import NewsFetcher
|
||||
fetcher = NewsFetcher()
|
||||
articles = fetcher.fetch_rss_feed("https://feeds.bbci.co.uk/news/rss.xml")
|
||||
print(f"✅ Fetched {len(articles)} articles")
|
||||
|
||||
# Test 2: Basic imports
|
||||
print("2. Testing imports...")
|
||||
from embeddings import EmbeddingGenerator
|
||||
from vector_store import VectorStore
|
||||
from recommender import NewsRecommender
|
||||
print("✅ All modules imported")
|
||||
|
||||
# Test 3: FastAPI server
|
||||
print("3. Testing FastAPI...")
|
||||
import requests
|
||||
try:
|
||||
response = requests.get("http://localhost:8000/", timeout=3)
|
||||
print(f"✅ FastAPI server: {response.json()['message']}")
|
||||
except:
|
||||
print("⚠️ FastAPI server not running")
|
||||
|
||||
print("🎉 Core system operational!")
|
||||
Reference in New Issue
Block a user