Skip to content

Commit 55d6883

Browse files
Getting back on track
1 parent 7a3158f commit 55d6883

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Chapter11-Web Scraping/mapIt.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /usr/bin/python3.5
2+
3+
"""
4+
5+
Author: Samrat Banerjee
6+
Dated: 17/07/2018
7+
Description: Project: Launches a map in the browser using an address from the command line or clipboard.
8+
9+
"""
10+
11+
import webbrowser,sys,pyperclip
12+
13+
if len(sys.argv)>1:
14+
# Get address from command line
15+
address=''.join(sys.argv[1:])
16+
else:
17+
# Get address from clipboard
18+
address=pyperclip.paste()
19+
20+
webbrowser.open('https://www.google.com/maps/place/'+address)

0 commit comments

Comments
 (0)