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