Pijush2023 commited on
Commit
76838a5
·
verified ·
1 Parent(s): ba5b01a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2459,7 +2459,7 @@ def fetch_local_news():
2459
  api_key = os.environ['SERP_API']
2460
  url = f'https://serpapi.com/search.json?engine=google_news&q=birmingham headline&api_key={api_key}'
2461
  response = requests.get(url)
2462
- if response.status_code == 200):
2463
  results = response.json().get("news_results", [])
2464
  news_html = """
2465
  <h2 style="font-family: 'Georgia', serif; color: #ff0000; background-color: #f8f8f8; padding: 10px; border-radius: 10px;">Birmingham Today</h2>
 
2459
  api_key = os.environ['SERP_API']
2460
  url = f'https://serpapi.com/search.json?engine=google_news&q=birmingham headline&api_key={api_key}'
2461
  response = requests.get(url)
2462
+ if response.status_code == 200:
2463
  results = response.json().get("news_results", [])
2464
  news_html = """
2465
  <h2 style="font-family: 'Georgia', serif; color: #ff0000; background-color: #f8f8f8; padding: 10px; border-radius: 10px;">Birmingham Today</h2>