python - 如何从 upcdatabase.org API (Python) 中获取特定数据
问题描述
使用 requests 包,我试图访问 upcdatabase.org API,只是为了打印出返回数据的特定部分。返回的数据如下所示:
{
"upc": "5705831011120",
"name": "Pink highlighter",
"alias": "Highlighter",
"description": "It's a pink highlighter. Here's some more information as
well.",
"brand": "Q-CONNECT",
"msrp": 0.99,
"status": 200,
"error": false
}
我试图让名称打印出来,但它似乎作为字符串返回给 python,而不是作为列表。任何帮助表示赞赏。
解决方案
推荐阅读
- javascript - 如果背景颜色为蓝色,则添加元素类
- java - FXMLLoader 在资源中找不到.fxml 文件
- vba - 第三个循环不执行导出,但前两个执行了
- c++ - 如何避免使用模块化架构重复功能
- azure - 创建策略定义时 ImageSKU 下的警告行
- data-mining - 什么是数据挖掘中的开放集分类?
- c++ - MPI 为不同数量的处理器提供不同的结果
- python - xpath //*[.="Foo"] 和 xpath //*["Foo"] 在谓词中只有一个字符串有什么区别?
- html - 如何使用 html 制作一个按钮,该按钮将导致下载 zip 文件
- amazon-web-services - 如何使用根用户凭证查找其他 AWS 用户规范 ID