Shreyas094 commited on
Commit
8661a16
·
verified ·
1 Parent(s): 898ed76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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_="VDXfz")
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']