【发布时间】:2021-02-28 02:23:44
【问题描述】:
我正在从 Zapier 中的上一步获取我认为的列表,然后尝试将该列表与字典(在代码中)进行比较,以将一个值或一组值作为新列表返回。我已经在我的桌面上成功测试了它,但它不会在 Zapier 中产生相同的输出。
我的上一步采用逗号分隔的列表并使用Utlities 格式化程序返回一个列表。我的错误可能是我假设这是一个列表。
我假设这是一个列表并将其用作Run Python 步骤的输入。
当我对此进行测试和审查时,结果没有错误,但也没有数据。任何关于我如何确保我理解传入数据的见解都会很棒。
Zapier 测试
list = []
for arg in input.values():
sharefile={
'Explore! Archaeology': 'https://hectv.sharefile.com/xxxx',
'Explore! Life as a Dog': 'https://hectv.sharefile.com/xxxx',
'Explore! Economics': 'https://hectv.sharefile.com/xxxx',
'The big chicken': 'https://hectv.sharefile.com/xxxx'
}
for index, (key, value) in enumerate(sharefile.items()):
if arg == key:
print(f'{arg} was matched')
list.append(value)
return(list)
【问题讨论】:
标签: python-3.x zapier