Fix google search

pull/51/head
Stijn De Clercq 2021-04-21 09:44:26 +02:00
parent 8e51364268
commit f76d70c169
1 changed files with 1 additions and 6 deletions

View File

@ -35,12 +35,7 @@ def google_search(query):
if link is None or title is None: if link is None or title is None:
return None return None
sp = title.find("span") return link["href"], title.text
if sp is None:
return None
return link["href"], sp.text
divs = bs.find_all("div", attrs={"class": "g"}) divs = bs.find_all("div", attrs={"class": "g"})