我成功地在 Zapier 中发布(POST)了一个 JSON 文件并为它创建了一个存储。但是,我想使用本地运行的 Python 代码访问 Zapier Storage 中的 JSON。我可以使用 Python3 访问存储,看看那里写的东西,但我无法访问 JSON 内容。
import urllib
import json
import codecs
reader = codecs.getreader("utf-8")
access_token = "password"
def GetStorage(page_id, access_token):
url = 'https://hooks.zapier.com/url/'
response = urllib.request.urlopen(url)
data = json.load(reader(response))
return data
a=GetStorage(url, access_token)
print(a)
我得到的是:
{'attempt': '5a539a49-65eb-44f8-a30e-e171faf7a680',
'id': '1b38d21a-0150-46df-98c1-490a0d04b565',
'request_id': '5a539a49-65eb-44f8-a30e-e171faf7a680',
'status': 'success'}
实际上我需要:
{'Name':'value',
'Address': 'value'
}
有任何想法吗 ?