Advertisement
Josif_tepe

Untitled

Nov 29th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import requests
  2. import json
  3. def get_data_for_city(city_name):
  4.     response = requests.get(f'https://skopje.pulse.eco/rest/dataRaw?sensorId=1001&type=pm10&from=2017-03-15T02:00:00%2b01:00&to=2017-03-19T12:00:00%2b01:00')
  5.     js = json.loads(response.text)
  6.  
  7.     for obj in js:
  8.         print(obj)
  9.  
  10.  
  11. if __name__ == "__main__":
  12.     get_data_for_city('skopje')
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement