Skip to content

Commit eb9c145

Browse files
authored
Deal with maps
Try with the search term "pizza" to see why this was done in #1932
1 parent 540023e commit eb9c145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_programming/crawl_google_results.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
links = list(soup.select(".eZt8xd"))[:5]
1919

2020
print(len(links))
21-
for link in links:
21+
if link.text == "Maps":
22+
webbrowser.open(link.get('href'))
23+
else:
2224
webbrowser.open(f"http://google.com{link.get('href')}")

0 commit comments

Comments
 (0)