因為沒完整的log,所以不確定,不過剛剛試了一下發現會踩到憑證問題。
這樣改就可以省略憑證確認
import urllib.request as req
import json
import ssl
context = ssl._create_unverified_context()
with req.urlopen("https://data.taipei/api/v1/dataset/1904ea7d-0bec-485f-8a5b-e4cfc1744111?scope=resourceAquire", context=context) as res:
data = json.load(res)
print(data)