Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -338,7 +338,7 @@ def fetch_local_news():
|
|
| 338 |
api_key = os.environ['SERP_API']
|
| 339 |
url = f'https://serpapi.com/search.json?engine=google_news&q=birmingham headline&api_key={api_key}'
|
| 340 |
response = requests.get(url)
|
| 341 |
-
if response.status_code == 200
|
| 342 |
results = response.json().get("news_results", [])
|
| 343 |
news_html = """
|
| 344 |
<h2 style="font-family: 'Georgia', serif; color: #ff0000; background-color: #f8f8f8; padding: 10px; border-radius: 10px;">Birmingham Today</h2>
|
|
|
|
| 338 |
api_key = os.environ['SERP_API']
|
| 339 |
url = f'https://serpapi.com/search.json?engine=google_news&q=birmingham headline&api_key={api_key}'
|
| 340 |
response = requests.get(url)
|
| 341 |
+
if response.status_code == 200:
|
| 342 |
results = response.json().get("news_results", [])
|
| 343 |
news_html = """
|
| 344 |
<h2 style="font-family: 'Georgia', serif; color: #ff0000; background-color: #f8f8f8; padding: 10px; border-radius: 10px;">Birmingham Today</h2>
|