Skip to content

Commit

Permalink
add webbrowser link to open each location found
Browse files Browse the repository at this point in the history
  • Loading branch information
KOWLOR committed Oct 30, 2016
1 parent 0bc62a4 commit 4d8eb90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FMIP.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import datetime, requests, time, base64, urllib2, json, getpass
import datetime, requests, time, base64, urllib2, json, getpass, webbrowser

def FMIP(username, password):
i = 0
Expand Down Expand Up @@ -73,6 +73,7 @@ def FMIP(username, password):
else:
timeStamp = "%s (%sm %ss ago)" % (timeStamp, str(minutes).split(".")[0], str(seconds).split(".")[0])
returnString += "Latitude, Longitude: <%s;%s>\n" % (y["location"]["latitude"], y["location"]["longitude"])
returnString += webbrowser.open("http://maps.google.com/maps?q=loc:%s,%s" % (y["location"]["latitude"], y["location"]["longitude"]))
returnString += "Battery: %s & %s\n" % (y["batteryLevel"], y["batteryStatus"])
returnString += "\033[92mLocated at: %s\033[0m\n" % timeStamp
returnString += "-------\n"
Expand Down

0 comments on commit 4d8eb90

Please sign in to comment.