0
目前我有以下代码。它正在工作,但并不完全符合我的需要。我需要从回复中获取json内容,只需一个参数即可。将Python POST请求转换为Python代码
url = 'https://somelinkhere/get_info'
data = {'auth_info':'{"session_id":"blablablaidhere"}', 'params':'{"id":"12345"}'}
response = requests.post(url, data=data)
res = response.content
print res
现在返回
'�Z[o�6�+���֖���ې�0�{h�`
AK�M�"����o�9�dI���t��@RI<��"�GD�D��.3MDeN��
��hͣw�fY)SW����`0�{��$���L��Zxvww����~�qA��(�u*#��݅Pɣ����Km���'
etc.
什么,我需要的是输出资源[ 'balance_info'] [ '平衡']
'requests'不是标准库。 – furas
卷曲转换器:https:// shibukawa.github.io/curl_as_dsl/index.html – furas