【发布时间】:2016-10-24 11:42:26
【问题描述】:
我需要请求一个 URL 列表,每次通过 POST 传递不同的变量,最重要的是,我需要保存每个请求的输出。
有没有办法使用 Python 让多个 URL 请求在后台运行,这样请求就不会一次完成(就像目前一样)?
for exrow in exdata:
id = exrow['increment_id']
mage = requests.post(complete_url, data = {'id' : id})
output = mage.content
if output :
f.writelines(output + ',')
【问题讨论】:
标签: python asynchronous