La Estación Espacial Internacional (ISS) es una estación espacial que se mantiene en movimiento en la órbita terrestre baja. Es habitable y el mayor satélite artificial que puede verse a simple vista desde la Tierra. Actúa como fábrica, observatorio y laboratorio.
Python code
#!/usr/bin/env python3 from urllib.request import urlopen import json import time feed_url="https://api.wheretheiss.at/v1/satellites/25544" def informacion(): try: jsonFeed = urlopen(feed_url) feedData = jsonFeed.read() #print feedData jsonFeed.close() data = json.loads(feedData) return data except Exception: import traceback print ("generic exception: " + traceback.format_exc()) return [] #use this method to retrieve from web API def parseISSDataFeed(): data = informacion() if len(data) == 0: return [] name = data['name'] lat = data['latitude'] lng = data['longitude'] alt = data['altitude'] return [name, lng, lat, alt] def main(): print (parseISSDataFeed()) if __name__ == "__main__": while(1): time.sleep(1) main()