我从其他页面中读到了一些答案,发现http://steamcommunity.com/profiles// inventory /json/570/2是我如何获得播放器清单的方法。在我去了那个地址之后,出现了很多数据。然而,问题是数据没有得到适当的显示。我有这样的东西。
{“成功”:真,"rgInventory":{"7905269096":{"id":"7905269096",“分类”:“771158876”,"instanceid":"782509058","amount":"1","pos":1},"7832200468":{"id":"7832200468",“分类”:“626495772”,“instanceid”:“146319908080”,“true”:“1”,"pos":2},"7832199378":{"id":"7832199378",“分类”:“626495770”、“实例”:“1463199082”、“数额”:“1”、"pos":3}、“7832197795”:{id:“7832197795”、“分类”:“626495773”、"instanceid":"1463199083“、”金额“:”1“、"pos":4}、”7832127932“:{id:”7832127932“、”分类“:”771156290“、”instanceid“:”1419963085“、”金额“:”1“,"pos":5}、"7832128369":{"id":"7832128369“、”分类“:”626495771“、"instanceid":"1463199086”、"amount":"1“、"pos":6}、"7832128042":{"id":"7832128042”、“分类”:“466386035”、"instanceid":"1463199087“、”amount“、”1“、"pos":7}、"7830087148":{"id":"7830087148”、“分类”:“536091705”,"instanceid":"1463199088“、”金额“:”1“、"pos":8}、"7822471023":{"id":"7822471023”、“分类”:“771179852”、"instanceid":"782509058“、”金额“:”1“、"pos":9}、"7797472279":{"id":"7797472279”、“分类”:“771410455”、“instanceid”:“2509058”、"amount":"1“、"pos":10}"7782683766":{"id":"7782683766“、”分类“:”771181072“、"instanceid":"782509058”、“金额”:“1”、"pos":11}、"7631976019":{"id":"7631976019“、”分类“:”77115718“、"instanceid":"782509058”、“金额”:“1”、“pos”:12}、"rgCurrency":[]、rgCurrency:[]“分类”:“771158876”,“示例”:“782509058”,"icon_url":"W_I_5GLm4wPcv9jJQ7z7tz_l_0sEIYUhRfbF4arNQkgGQGKd3kMuVpMgCwRZrh6GdUmV2uVefqzZAxsqDpH8eVO4Nb2CyAaiWsVUbt1mBngc3Zm32FdEXSSFBuQVD4Z97J3LgwOxDlDHfjc9z40ChfLKg86GW_CBqRXhIgJ1zaQ3WkhKx3uK","icon_url_large":"W_I_5GLm4wPcv9jJQ7z7tz_l_0sEIYUhRfbF4arNQkgGQGKd3kMuVpMgCwRZrh6GdUmV2uVefqzZAxsqDpH8eVO4Nb2CyAaiWsVUbt1mBngc3Zm32CZOBWOAUKgdCoUqtJKW0Q7rCFKTLTVowoQBhPHGhMOGCK_YrRq1JVAm2rA7CM1GhVgPNerBnXLi","icon_drag_url":"","name":"Ogre's Caustic Steel Choppers","market_hash_name":"Ogre's Caustic Steel Choppers","market_name":"Ogre's Caustic Steel Choppers","name_color":"D2D2D2“、"background_color":"”、“类型”:“不寻常的剑”、“可交易的”:0、“可销售的”:0、“商品”:0、"market_tradable_restriction":"7“、"market_marketable_restriction":"7”、“描述”:[{“类型”:“html”、“值”:“由:炼金术士使用”}
有什么办法使它更整洁吗?这样我就可以读取数据了吗?或者有人能告诉我如何处理这些数据吗?谢堆
发布于 2016-02-10 01:47:48
该数据采用JSON格式(http://www.json.org/)。它适合应用程序使用。因此,您应该编写一个小程序来读取这些数据,解析它并查询更多的元素。例如,(这里只是猜测)有一个API,您可以在那里通过它的ID (类似于http://steamcommunity.com/items/7832200468)获取一个项目。
这个程序的输出可以是一个项目的列表(文本或HTML),以及它们的名称、值、稀缺性等。
https://stackoverflow.com/questions/35305463
复制相似问题