Beispiel #1
0
 def getData(self):
     file_names, params = self.gen_query(self.lat, self.lon, self.date)
     file_names.reverse()
     params.reverse()
     # print("F: " ,file_names)
     weather = []
     for file_name, param in zip(file_names, params):
         api_call = self.api_format + param
         resp = requests.get(api_call)
         d = DataExtractor(self.oID, resp.content)
         # print(d.maxPrecip(), ":", resp.content)
         # print(d.maxPrecip(), end = ' ')
         weather.append(str(d.maxPrecip()))
         # weather.extend([d.maxPrecip(), d.maxTemp(),    d.maxAirPressure(), d.maxHumidity(), d.maxWind()])
     # print()
     return weather