![](/img/trans.png)
[英]How to send nested dictionary as params in python requests.get?
[英]How to send dictionary in params Python Requests Library
有人可以幫我嗎 我很難弄清楚如何使用 Python 的請求庫在 Get 請求的參數中發送字典。 下面是參數在檢查元素中的樣子。 我已經嘗試了幾種不同的組合來完成這項工作,但我一直從 API 收到錯誤消息,說 {'error_details': "required selection'sellout_inclusion' is missing.,'data': None}。 對此的任何幫助將不勝感激。 謝謝。
參數選擇:{sellout_inclusion: ["Include All"]}
例子:
import requests
PARAMS = {"selections": {'sellout_inclusion': ["Include All"]}}
res = requests.get('https://www.google.com/', params=PARAMS)
print(res.text)
問題可能出在 API 你請求數據你可以閱讀這篇文章如果我的例子沒有,它可能會有所幫助
https://jakevdp.github.io/PythonDataScienceHandbook/03.04-缺失值.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.