Deal with maps (#1945)

* Deal with maps

Try with the search term "pizza" to see why this was done in #1932

* fixup! Format Python code with psf/black push

* Update armstrong_numbers.py

* updating DIRECTORY.md

* Update crawl_google_results.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2020-05-06 03:32:40 +02:00
committed by GitHub
parent 1e84aabaea
commit 08c8bb5ad5
4 changed files with 18 additions and 7 deletions

View File

@ -19,4 +19,7 @@ if __name__ == "__main__":
print(len(links))
for link in links:
webbrowser.open(f"http://google.com{link.get('href')}")
if link.text == "Maps":
webbrowser.open(link.get("href"))
else:
webbrowser.open(f"http://google.com{link.get('href')}")