From f76d70c16965b40e3ef9126080e436dd5f69bc0b Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Wed, 21 Apr 2021 09:44:26 +0200 Subject: [PATCH] Fix google search --- functions/scraping.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions/scraping.py b/functions/scraping.py index 20ed536..6735c5c 100644 --- a/functions/scraping.py +++ b/functions/scraping.py @@ -35,12 +35,7 @@ def google_search(query): if link is None or title is None: return None - sp = title.find("span") - - if sp is None: - return None - - return link["href"], sp.text + return link["href"], title.text divs = bs.find_all("div", attrs={"class": "g"})