We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 51d1c78 commit 8bee646Copy full SHA for 8bee646
web_programming/open_google_results.py
@@ -30,19 +30,11 @@
30
print(BeautifulSoup(res.text, "html.parser"))
31
32
try:
33
- link = (
34
- BeautifulSoup(res.text, "html.parser")
35
- .find("div")
36
- .find("a")
37
- .get("href")
38
- )
+ link = BeautifulSoup(res.text, "html.parser").find("div").find("a").get("href")
39
40
except AttributeError:
41
link = parse_qs(
42
43
44
45
+ BeautifulSoup(res.text, "html.parser").find("div").find("a").get("href")
46
)["url"][0]
47
48
webbrowser.open(link)
0 commit comments