diff --git a/src/app/api/core/news.py b/src/app/api/core/news.py index 1f67999..f80fcc9 100644 --- a/src/app/api/core/news.py +++ b/src/app/api/core/news.py @@ -9,6 +9,7 @@ class Article(BaseModel): time: str = "" title: str = "" description: str = "" + url: str = "" class NewsWrapper: """ diff --git a/src/app/api/news/cryptopanic_api.py b/src/app/api/news/cryptopanic_api.py index 4e6f6db..3884eda 100644 --- a/src/app/api/news/cryptopanic_api.py +++ b/src/app/api/news/cryptopanic_api.py @@ -29,6 +29,7 @@ def extract_articles(response: dict[str, Any]) -> list[Article]: article.time = item.get('published_at', '') article.title = item.get('title', '') article.description = item.get('description', '') + article.url = item.get('url', '') articles.append(article) return articles diff --git a/src/app/api/news/duckduckgo.py b/src/app/api/news/duckduckgo.py index 7fe232d..ac0cf8d 100644 --- a/src/app/api/news/duckduckgo.py +++ b/src/app/api/news/duckduckgo.py @@ -10,6 +10,7 @@ def extract_article(result: dict[str, Any]) -> Article: article.time = result.get("date", "") article.title = result.get("title", "") article.description = result.get("body", "") + article.url = result.get("url", "") return article class DuckDuckGoWrapper(NewsWrapper): diff --git a/src/app/api/news/googlenews.py b/src/app/api/news/googlenews.py index 6b3a3ff..dc87744 100644 --- a/src/app/api/news/googlenews.py +++ b/src/app/api/news/googlenews.py @@ -9,6 +9,7 @@ def extract_article(result: dict[str, Any]) -> Article: article.time = result.get("publishedAt", "") article.title = result.get("title", "") article.description = result.get("description", "") + article.url = result.get("url", "") return article class GoogleNewsWrapper(NewsWrapper): diff --git a/src/app/api/news/newsapi.py b/src/app/api/news/newsapi.py index 142b6f7..664ece9 100644 --- a/src/app/api/news/newsapi.py +++ b/src/app/api/news/newsapi.py @@ -10,6 +10,7 @@ def extract_article(result: dict[str, Any]) -> Article: article.time = result.get("publishedAt", "") article.title = result.get("title", "") article.description = result.get("description", "") + article.url = result.get("url", "") return article class NewsApiWrapper(NewsWrapper):