Skip to content

Commit a2b6b9c

Browse files
authored
Update crawl_google_results.py
1 parent eb9c145 commit a2b6b9c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

web_programming/crawl_google_results.py

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

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

0 commit comments

Comments
 (0)