Last active
April 23, 2017 20:00
-
-
Save wohali/f9c13f3f0c6cd7be56f610dcd0b34ac5 to your computer and use it in GitHub Desktop.
for geekmoon METAR/TAF support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://avwx.rest/documentation has all the details | |
import requests | |
STATION='CYYZ' | |
SPEECH=True | |
r = requests.get("http://avwx.rest/api/metar/" + STATION + "?options=info,speech") | |
metar = r.json() | |
if SPEECH: | |
print (metar["Speech"]) | |
else: | |
print (metar["Raw-Report"] + ' ' + metar["Remarks"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://avwx.rest/documentation has all the details | |
import requests | |
STATION='CYYZ' | |
r = requests.get("http://avwx.rest/api/taf/" + STATION) | |
taf = r.json() | |
print (taf["Raw-Report"] + ' ' + taf["Remarks"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment