This commit is contained in:
louiscklaw
2025-01-31 21:57:33 +08:00
parent 52904f5284
commit 6c95c5e3ea
39 changed files with 32542 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# https://api.data.gov.hk/v1/carpark-info-vacancy?data=vacancy&vehicleTypes=privateCar
import requests
from pprint import pprint
url = "https://api.data.gov.hk/v1/carpark-info-vacancy"
params = {
"data": "vacancy",
"vehicleTypes": "privateCar"
}
response = requests.get(url, params=params)
js_result = response.json()['results']
js_row = js_result[0]
pprint(js_row)
pprint("length of json: "+str(len(js_result)))