Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,18 +22,13 @@ def get_news_headlines() -> str:
|
|
22 |
"""
|
23 |
api_key = "2f90b8ee0ea64f08b2e9a4c9a13a69c4"
|
24 |
|
25 |
-
sources = "google-news-in"
|
|
|
|
|
|
|
26 |
language = "en" # Define language before using it
|
27 |
|
28 |
-
# Dictionary to store source
|
29 |
-
source_info = {
|
30 |
-
"name": "Google News (India)",
|
31 |
-
"description": "Comprehensive, up-to-date India news coverage, aggregated from sources all over the world by Google News.",
|
32 |
-
"url": "https://news.google.com",
|
33 |
-
"category": "general",
|
34 |
-
"language": language,
|
35 |
-
"country": "in"
|
36 |
-
}
|
37 |
url = f"https://newsapi.org/v2/everything?q=&sources={sources}&language={language}&apiKey={api_key}"
|
38 |
|
39 |
try:
|
|
|
22 |
"""
|
23 |
api_key = "2f90b8ee0ea64f08b2e9a4c9a13a69c4"
|
24 |
|
25 |
+
sources = "google-news-in"
|
26 |
+
name": "Google News (India)"
|
27 |
+
description": "Comprehensive, up-to-date India news coverage, aggregated from sources all over the world by Google News.",
|
28 |
+
url: "https://news.google.com",
|
29 |
language = "en" # Define language before using it
|
30 |
|
31 |
+
# Dictionary to store source deta
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
url = f"https://newsapi.org/v2/everything?q=&sources={sources}&language={language}&apiKey={api_key}"
|
33 |
|
34 |
try:
|