在浏览器中打开HTTP POST响应

时间:2018-10-11 10:43:58

标签: python http post

我有一个URL,该URL生成具有POST参数的自定义代谢网络图。

url = 'https://pathways.embl.de/ipath3.cgi'

有关所有POST参数的说明,请参见直接提交标签下的here

我有一个生成参数的脚本,但是下面只考虑两个参数,selection和tax_filter。

import requests
param = dict(selection = 'C00033 #fee695 W25', tax_filter = 'eco')
response = requests.post(url, data = param)
print(response)
>>> <Response [200]>

我想从python打开一个浏览器,该浏览器以黄色'C00033 #fee695 W25'的形式显示代谢图。浏览器中所需的输出如下所示:

this

有什么办法可以通过请求响应做到这一点?我是否应该研究类似urllib.parse.urlencode的东西?我该怎么办?

0 个答案:

没有答案