Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def get_news_headlines() -> str:
|
|
56 |
Returns:
|
57 |
str: A string containing the top 5 news headlines and their sources, or an error message.
|
58 |
"""
|
59 |
-
api_key = "
|
60 |
url = f"https://newsapi.org/v2/top-headlines?country=us&apiKey={api_key}"
|
61 |
|
62 |
try:
|
|
|
56 |
Returns:
|
57 |
str: A string containing the top 5 news headlines and their sources, or an error message.
|
58 |
"""
|
59 |
+
api_key = "<>" # Replace with your actual API key from https://newsapi.org/
|
60 |
url = f"https://newsapi.org/v2/top-headlines?country=us&apiKey={api_key}"
|
61 |
|
62 |
try:
|