Merge pull request #380 from PeterLaemmle/develop

Update Telegram.py
This commit is contained in:
Bastian Schroll 2018-10-23 07:51:05 +02:00 committed by GitHub
commit 28d45966b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -5,6 +5,7 @@
##### Added
- Pushover-Plugin: Priorität für einzelne RIC und ZVEI in config einstellbar [#378](https://github.com/Schrolli91/BOSWatch/pull/378)
##### Changed
- Kleinere Anpassungen im Telegram Plugin (Karten-Generierung) [#380](https://github.com/Schrolli91/BOSWatch/pull/380)
##### Deprecated
##### Removed
- Notify-my-Andoird Plugin und Logging-Handler wegen Einstellung des Service entfernt [#374](https://github.com/Schrolli91/BOSWatch/pull/374)

View file

@ -100,9 +100,9 @@ def run(typ,freq,data):
address = "+".join(data["msg"].split(')')[0].split('/',1)[1].replace('(',' ').split())
logging.debug("Retrieve maps from Google")
url = "+".join(["http://maps.googleapis.com/maps/api/staticmap?markers=", address, "&size=480x640&maptype=roadmap&zoom=16&key=", GoogleAPIKey])
url = "".join(["http://maps.googleapis.com/maps/api/staticmap?markers=", address, "&size=480x640&maptype=roadmap&zoom=16&language=de&key=", GoogleAPIKey])
urllib.urlretrieve(url, "overview_map.png")
url = "+".join(["http://maps.googleapis.com/maps/api/staticmap?markers=", address, "&size=240x320&scale=2&maptype=hybrid&zoom=17&key=", GoogleAPIKey])
url = "".join(["http://maps.googleapis.com/maps/api/staticmap?markers=", address, "&size=240x320&scale=2&maptype=hybrid&zoom=17&language=de&key=", GoogleAPIKey])
urllib.urlretrieve(url, "detail_map.png")
# Send message and map with Telegram