Update Telegram.py

This commit is contained in:
PeterLaemmle 2018-10-28 21:03:57 +01:00 committed by GitHub
parent f35ca75688
commit 6fa93f2f99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,6 +101,7 @@ def run(typ,freq,data):
# Origin for routing, use format 'City+Street+Number'
origin = "CityOfDeparture+Street+Number"
# Retrieve directions using Google API
logging.debug("Retrieve polylines from Directions API")
url = "".join(["https://maps.googleapis.com/maps/api/directions/json?origin=", origin, "&destination=", address, "&mode=driving&key=", GoogleAPIKey])
response = json.loads(requests.get(url).content.decode('utf-8'))