Update app.py
Browse files
app.py
CHANGED
@@ -192,8 +192,8 @@ def google_news_search(term, num_results=5, lang="en", timeout=5, safe="active",
|
|
192 |
for article in articles:
|
193 |
if len(all_results) >= num_results:
|
194 |
break
|
195 |
-
|
196 |
-
link_element = article.find("a", class_="
|
197 |
if link_element:
|
198 |
# Google News uses relative URLs, so we need to construct the full URL
|
199 |
relative_link = link_element['href']
|
|
|
192 |
for article in articles:
|
193 |
if len(all_results) >= num_results:
|
194 |
break
|
195 |
+
link_element = article.find("a", attrs={"class": "WwrzSb"}) or article.find("a", href=True)
|
196 |
+
# link_element = article.find("a", class_="WwrzSb")
|
197 |
if link_element:
|
198 |
# Google News uses relative URLs, so we need to construct the full URL
|
199 |
relative_link = link_element['href']
|