Skip to content

Commit 555def5

Browse files
authored
Update __init__.py (#134)
Removed find for 'H4' as it is not present in the article, instead finding 'a' and getting the href from it.
1 parent 044c1db commit 555def5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GoogleNews/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def get_news(self, key="",deamplify=False):
311311
link = article.find("article").get("jslog").split('2:')[1].split(';')[0]
312312
else:
313313
try:
314-
link = 'news.google.com/' + article.find("h4").parent.get("href")[2:]
314+
link = 'news.google.com/' + article.find("a").get("href")[2:]
315315
except Exception as deamp_e:
316316
print(deamp_e)
317317
link = None

0 commit comments

Comments
 (0)