We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5081ca7 commit efa5ad7Copy full SHA for efa5ad7
Beautifulsoup_WebScraping/mapIt.py
@@ -0,0 +1,27 @@
1
+#! python3
2
+# mapIt.py - Launches a map in the browser using an address from the
3
+# command line or clipboard.
4
+
5
+# Importing all the necessary Libraries.
6
+import webbrowser # Used for opening google maps website
7
+import sys # For Retrirving the address from the commandline
8
+import pyperclip # To Retrieve the address from the clipboard.
9
10
+# get the address from either the command line or clipboard.
11
+if len(sys.argv) > 1:
12
+ # Get address from the command line
13
+ ## As the sys.argv[0] is the program name
14
+ addr = ' '.join(sys.argv[1:])
15
16
+# Get the address from teh clipboard if the address
17
+# is not passed as an argument in the commandline.
18
+else:
19
+ addr = pyperclip.paste()
20
21
22
+# pyperclip.copy('870 Valencia St, San Francisco, CA 94110')
23
+# addr = pyperclip.paste()
24
25
+#
26
+address = addr.replace(',', '').split(' ')
27
+webbrowser.open('https://www.google.com/maps/place/'+ str('+'.join(address)) + '/')
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments