我如何找到具有特定URL的request.post函数所需的数据参数?

问题描述 投票:0回答:1

我想使用请求库向特定网页http://latex2png.com/api/convert发出请求,以便将某些乳胶转换为PNG图像。但是,我不确定该网站接受哪些数据参数。

有什么方法可以使用requests库来查看需要满足哪些参数?

我尝试跑步

options = {
    "auth": {"user": "guest", "password": "guest"},
    "latex": '$a^3$',
    "resolution": 900,
    "color": "969696",
}

r = requests.post('http://latex2png.com/api/convert')

print(r.content)

但是我得到了b'{"result-message":"no request","result-code":-2}'

没有关于此特定API和网站的在线文档或帮助。

python python-requests aiohttp
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.