diff options
| author | root <root@turin.home> | 2022-01-16 13:41:03 +0000 |
|---|---|---|
| committer | root <root@turin.home> | 2022-01-16 13:41:03 +0000 |
| commit | 2ee793179e345f3355462c8d2753543bc397a2aa (patch) | |
| tree | d1c68adff555f3dc3fbf8a5702855114119bff10 /weather.py | |
| parent | befb917ec5cbcbb0aaae33c53e6c0b2c4b92afcf (diff) | |
Reformat code
Diffstat (limited to 'weather.py')
| -rw-r--r-- | weather.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -36,10 +36,10 @@ class weather_met_no(weather): def get_temperature(self): # https://docs.python-requests.org/en/latest/ try: - data = requests.get( - self.CALL, headers=self.HEADERS - ).json()['properties']['timeseries'][0]['data'] - return data['instant']['details']['air_temperature'] + data = requests.get(self.CALL, headers=self.HEADERS).json()["properties"][ + "timeseries" + ][0]["data"] + return data["instant"]["details"]["air_temperature"] # data['next_1_hours']['summary']['symbol_code'] except: return -1 |
