Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ signs = [
|
|
| 14 |
|
| 15 |
def get_trending_news():
|
| 16 |
"""Fetch and return trending Technology news headlines."""
|
| 17 |
-
url = f"http://newsapi.org/v2/top-headlines?country=us&
|
| 18 |
try:
|
| 19 |
page = requests.get(url).json()
|
| 20 |
articles = page["articles"]
|
|
|
|
| 14 |
|
| 15 |
def get_trending_news():
|
| 16 |
"""Fetch and return trending Technology news headlines."""
|
| 17 |
+
url = f"http://newsapi.org/v2/top-headlines?country=us&category=technology&apiKey={HF_API_KEY}"
|
| 18 |
try:
|
| 19 |
page = requests.get(url).json()
|
| 20 |
articles = page["articles"]
|