json.loads() json解码

有些json数据里面套着json    一次json.loads()后还是会有数据是json格式

{
  "result": {
    "error_code": 0,
    "error_message": ""
  },
  "items": [
    {
      "3rd_class": "",
      "4th_class": "",
      "FGZ_num": "",
      "IBar_num": "",
      "Kuaiba_num": "",
      "MZD_num": "",
      "Ruiqi_num": "",
      "WWDS_num": "",
      "WZKC_num": "",
      "XS_num": "",
      "YGX_num": "",
      "YY_num": "",
      "acc_exe_paths": "game.exe;game_2001006.exe",
      "access_rail_sdk": "",
      "accl_vip_level": "",
      "activation_machine_limit_per_day": "",
      "activity_state": 0,
      "app_img_cover": "",
      "auto_exit": "0",
      "auto_show_cross_default": "",
      "auto_sync_profile_default": "1",
      "auto_update_default_setting": "0",
      "background_url": "",
      "banner_icon_url": "http://cdn.rail.tgp.qq.com/info/games/2001006/818476a358fd944f43e6c50d39047e22.png",
      "banner_mini_icon_url": "http://cdn.rail.tgp.qq.com/info/games/2001006/32ac159316a24ee8c74da6243a16f9f2.png",
      "banner_url": "",
      "basic_config_cpu": "",
      "basic_config_disk": "",
      "basic_config_gpu": "",
      "basic_config_mem": "",
      "best_config_cpu": "",
      "best_config_disk": "",
      "best_config_gpu": "",
      "best_config_mem": "",
      "black_proc_names": "",
      "can_modify_nickname": "",
      "category": "1",
      "check_id_authentication": "",
      "check_id_authentication_oversea": "",
      "check_user_is_adult": "",
      "check_user_is_adult_oversea": "",
      "circular_icon": "http://cdn.rail.tgp.qq.com/info/games/2001006/d1ee02c1772c0497fc2f55400bf96d4e.png",
      "circular_icon_color": "",
      "close_acc": "0",
      "close_cross": "0",
      "close_game_helper": "0",
      "close_plugin_setting": "0",
      "close_social": "",
      "comments": "互攻式塔防+roguelike,召唤使魔与敌对的魔女使魔军团作战。收集道具,组建卡组,通过层层难关,到达归途的终点。",
      "common_config_info": "",
      "custom_color": "",
      "data_name": "2001006",
      "depot_info": "",
      "depot_update_info": "",
      "description": "<p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">《夜之归途》玩家交流qq群:</span><strong style=\"background-color: transparent; color: rgb(0, 0, 0);\"><u>213634733</u></strong></p><p><br></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">这是一款互攻式塔防 + Rougelike元素的游戏。</span></p><p><br></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">玩家操纵的小魔女主要通过召唤各种“使魔”与敌对的魔女的使魔军团作战。</span></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">战胜敌对的魔女则会获得各种奖励,选择获得更适合自己战术的使魔来强化自己的部队。</span></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">除了战斗,大量的事件关卡被散布在地图中,事件中的各类选择将会有各种意想不到的奖励或惩罚。</span></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">但是,每一次的选择,几乎都是不可逆的,做决断之前务必再三考虑后果。</span></p><p><br></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">挑战强大的对手将会有更多的奖励,如何攻略这个地图,由玩家自行摸索。</span></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">没有最好的组合,只有最适合的编队。</span></p><p><br></p><p><span style=\"background-color: transparent; color: rgb(0, 0, 0);\">反复挑战解锁更多内容,将会让你的归途更加丰富多彩!</span></p>",
      "developer": "凌晨两点",
      "developer_name": "凌晨两点",
      "dir_server_addr": "",
      "disable_independent_sale": 0,
      "discount": {
        "off": 0,
        "start_time": 0,
        "type": 1,
        "end_time": 0,
        "discount_price": 9999
      },
      "distribution_channels": "2",
      "dl_button_adv": "",
      "dl_button_adv_link": "",
      "download_gift_url": "",
      "download_urls": "[{\"url\":\"https:\\/\\/wgdl.qq.com\\/tgc\\/tgp\\/rail\\/55555\\/Fake55555.exe\",\"backup\":\"http:\\/\\/wgdl.qq.com\\/tgc\\/tgp\\/rail\\/55555\\/Fake55555.exe\"}]",
      "download_urls_qa": "",
      "downloadable_time": 1494312648,
      "dynamic_background": "{\"type\":0,\"url\":\"http:\\/\\/cdn.rail.tgp.qq.com\\/info\\/games\\/2001006\\/a1a332c63584558d880ec3f9b702c632.jpg\"}",
      "e_game_name": "Night Homing",
      "en_install_dir": "",
      "en_install_path_only": "0",
      "enable_storage": 1,
      "exit_method": "0",
      "exit_method_param": "",
      "fight_mode": "",
      "file_signature_2": "",
      "file_signature_3": "",
      "file_signatures_1": "game.exe",
      "fixed_storage_path": "",
      "game_app_id": "",
      "game_detail": {
        "url": "https://rail.tgp.qq.com/web/data_filter/game_detail/by_game_id"
      },
      "game_id": "2001006",
      "game_identify_mode": "1",
      "game_name": "夜之归途",
      "game_shell_type": "0",
      "game_signature": [
        {
          "file_signatures_1": "game.exe",
          "tcls_name": "",
          "data_name": "2001006",
          "game_identify_mode": "1",
          "item_update_time": "2019-04-25 23:27:50",
          "dir_server_addr": "",
          "priority": "0",
          "item_id": "931",
          "file_signature_2": "",
          "file_signature_3": "",
          "game_id": "2001006",
          "reg_install_key_name": "",
          "reg_install": "Rail\\\\Game",
          "reg_uninstall": ""
        }
      ],
      "game_type": 0,
      "gouhuo_id": "",
      "guss_you_pic": "",
      "has_dlc_as_branch": "",
      "has_tclshost": "8",
      "hide_zone_list": "",
      "home_banner_image": "",
      "home_banner_screenshot": [],
      "icon_url": "http://cdn.rail.tgp.qq.com/info/games/2001006/d1ee02c1772c0497fc2f55400bf96d4e.png",
      "iigw_st_in_key_process": "",
      "img_banner": "",
      "img_cover": "http://cdn.rail.tgp.qq.com/info/games/2001006/e550a7b8c926236a99f232cea16aebc6.jpg",
      "img_cover_vertical": "http://cdn.rail.tgp.qq.com/info/games/2001006/252791434da0269463a60c4d6005df94.jpg",
      "img_rank": "",
      "indentify_blacklist_mode": "",
      "install_folder": "NightHoming",
      "install_mode": "",
      "installed_size": "1478285119",
      "installed_size_qa": "",
      "installer_certificate": "",
      "installer_keyword": "",
      "installer_md5_list": "[{\"Fake55555.exe\":\"ffffffffffffffffffffffffffffffff\"}]",
      "installer_md5_list_qa": "",
      "installer_size": "503704052",
      "installer_size_qa": "",
      "intro_url": "",
      "is_check_installer_certificate": "",
      "is_check_installer_md5": "1",
      "is_check_signature": 0,
      "is_first_name": "",
      "is_game_integrated_sdk_storage_api": "",
      "is_game_sync_storage_enable": "",
      "is_multi_branch_game": "0",
      "is_support_fix_console_game": "",
      "is_testing": 0,
      "is_wing_project": 0,
      "item_id": "1365",
      "item_update_time": "2019-11-11 18:11:24",
      "last_update": "",
      "launch_cmd": "",
      "launch_game_update": "",
      "launch_game_white_list_msg": "",
      "launch_game_white_list_rich_msg": "",
      "launch_repair_game": "0",
      "launch_repair_white_list": "",
      "launch_type": "0",
      "limit_duplicate_nickname": "",
      "limit_purchase": 0,
      "limit_purchase_begin_time": 1457712000,
      "limit_purchase_user_num": 0,
      "limit_type": 0,
      "loader_path": "\\game.exe",
      "log_paths": [],
      "logo_url": "http://cdn.rail.tgp.qq.com/info/games/2001006/d1ee02c1772c0497fc2f55400bf96d4e.png",
      "master_game_id": 0,
      "mid_size_pic": "",
      "multi_launch_cnt": "1",
      "multi_loader": "[{\n\t\"owns_dlc_id\": -1,\n\t\"cpu_bits\": \"any\",\n\t\"executable\": \"game.exe\",\n\t\"description\": \"主启动器\",\n\t\"beta_branch\": -1,\n\t\"is_cmd\": 1,\n\t\"working_dir\": \"\",\n\t\"arguments\": \"\"\n}]",
      "multi_material_poster_url_h": [
        "http://cdn.rail.tgp.qq.com/info/games/2001006/e550a7b8c926236a99f232cea16aebc6.jpg"
      ],
      "multi_material_poster_url_v": [
        "http://cdn.rail.tgp.qq.com/info/games/2001006/252791434da0269463a60c4d6005df94.jpg"
      ],
      "name": "夜之归途",
      "name_first_letter": "",
      "need_activate": "0",
      "need_launch_white_list": "0",
      "need_use_privated_tp_compnents": "",
      "net_mode": "",
      "netbar_popularity": "",
      "netbar_signature_id": "",
      "netbar_signature_id_netbar_version": "",
      "new_bigproduct_pic": "",
      "new_external_update": "",
      "new_game": "0",
      "new_preview_pic": "",
      "official_web_site": "",
      "open_download_time": "",
      "open_service_id": "",
      "open_state": 2,
      "operate_phase": "公测",
      "operate_phase_class": "公测",
      "original_price": 9999,
      "original_price_for_midas": 99990,
      "pf_info": "",
      "popularity": "",
      "poster_color": "",
      "poster_url_h": "http://cdn.rail.tgp.qq.com/info/games/2001006/e550a7b8c926236a99f232cea16aebc6.jpg",
      "poster_url_v": "http://cdn.rail.tgp.qq.com/info/games/2001006/252791434da0269463a60c4d6005df94.jpg",
      "priority": "0",
      "prop_account": 0,
      "prop_cloud": 0,
      "prop_controller": 0,
      "prop_copyright_disputes": 0,
      "prop_early_test": 0,
      "prop_leaderboard": 0,
      "prop_module": 0,
      "prop_offline": 0,
      "prop_offline_multiplayer": 0,
      "prop_online": 0,
      "prop_purchasable": 0,
      "prop_refund": 1,
      "prop_server": 0,
      "prop_tgp_achieve": 1,
      "prop_translation": 0,
      "publish": "3",
      "publish_time": "2019-11-01 00:00:00",
      "publisher": "心火游戏",
      "query_game_permission_new": "",
      "query_player_info": "",
      "question_type": [],
      "real_name_required": "1",
      "recommend_branches": "",
      "reg_install": "Rail\\\\Game",
      "reg_install_key_name": "",
      "reg_uninstall": "",
      "release_time": 1572537600,
      "release_time_unsure": 0,
      "remote_acc_config": "",
      "remote_acc_config_time": "",
      "repository_info_install": "{\"version\":{\"branch_id\":1,\"cdn_root\":\"http://wgdl.qq.com/tgc/repository\",\"game_id\":2001006,\"repositories\":[{\"cdn_root\":\"http://down.qq.com/tgc/werepository/rid.10574-r.9b1c3\",\"chunks\":[{\"chunk_index\":0,\"chunk_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"chunk_size\":843768,\"chunk_uncompress_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"chunk_uncompress_size\":843768}],\"manifest_compress_type\":\"\",\"manifest_id\":8528163391240479041,\"manifest_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"manifest_size\":843768,\"patch_size\":23828994,\"repository_id\":10574,\"repository_name\":\"/manifest/10574_8528163391240479041_cdn.wgj\",\"repository_type\":\"Game\"},{\"cdn_root\":\"http://down.qq.com/tgc/werepository/rid.10575-r.67ad3\",\"chunks\":[{\"chunk_index\":0,\"chunk_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"chunk_size\":1544,\"chunk_uncompress_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"chunk_uncompress_size\":1544}],\"manifest_compress_type\":\"\",\"manifest_id\":8528163391240479042,\"manifest_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"manifest_size\":1544,\"patch_size\":326,\"repository_id\":10575,\"repository_name\":\"/manifest/10575_8528163391240479042_cdn.wgj\",\"repository_type\":\"InstallScript\"}],\"version_id\":\"0.0.0.43\"}}",
      "repository_info_update": "{\"version\":{\"branch_id\":1,\"cdn_root\":\"http://wgdl.qq.com/tgc/repository\",\"game_id\":2001006,\"repositories\":[{\"cdn_root\":\"http://down.qq.com/tgc/werepository/rid.10574-r.9b1c3\",\"chunks\":[{\"chunk_index\":0,\"chunk_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"chunk_size\":843768,\"chunk_uncompress_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"chunk_uncompress_size\":843768}],\"manifest_compress_type\":\"\",\"manifest_id\":8528163391240479041,\"manifest_md5\":\"0b0f2ec06415b4f1cea8f414206ed40d\",\"manifest_size\":843768,\"patch_size\":23828994,\"repository_id\":10574,\"repository_name\":\"/manifest/10574_8528163391240479041_cdn.wgj\",\"repository_type\":\"Game\"},{\"cdn_root\":\"http://down.qq.com/tgc/werepository/rid.10575-r.67ad3\",\"chunks\":[{\"chunk_index\":0,\"chunk_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"chunk_size\":1544,\"chunk_uncompress_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"chunk_uncompress_size\":1544}],\"manifest_compress_type\":\"\",\"manifest_id\":8528163391240479042,\"manifest_md5\":\"94bc1406f3b681fa222e246f3a4fd5fe\",\"manifest_size\":1544,\"patch_size\":326,\"repository_id\":10575,\"repository_name\":\"/manifest/10575_8528163391240479042_cdn.wgj\",\"repository_type\":\"InstallScript\"}],\"version_id\":\"0.0.0.43\"}}",
      "screenshots": "[{\"content\":\"t086921wjm7\",\"thumb\":\"http:\\/\\/puui.qpic.cn\\/qqvideo_ori\\/0\\/t086921wjm7_496_280\\/0\",\"type\":\"1\"},{\"content\":\"v0863nclm02\",\"thumb\":\"http:\\/\\/puui.qpic.cn\\/qqvideo_ori\\/0\\/v0863nclm02_496_280\\/0\",\"type\":\"1\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4513950d71595f5adf9081f377e7a774.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4513950d71595f5adf9081f377e7a774.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/a6189769d199568691cf64f880dab4eb.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/a6189769d199568691cf64f880dab4eb.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/7a6ac3f0636f277aec94a7519857c156.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/7a6ac3f0636f277aec94a7519857c156.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/b04dec6f35f10074b2b73eb7be187251.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/b04dec6f35f10074b2b73eb7be187251.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4f7712ff9d48c5c6b0987580eb79805e.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4f7712ff9d48c5c6b0987580eb79805e.jpg\\/1000\",\"type\":\"0\"}]",
      "search_keywords": "",
      "service_id": "1001",
      "show_adult_notice": "",
      "show_adult_notice_oversea": "",
      "show_download_gift": "",
      "show_health_notice": "",
      "show_health_notice_oversea": "",
      "show_in_formal": "1",
      "show_prate": "",
      "show_pre_acts": "",
      "show_update_gift": "",
      "silent_install": "1",
      "silently_add_assist": "0",
      "silently_dl_pkg": "0",
      "slogan": "首款互攻式塔防+roguelike游戏",
      "sub_class": "15",
      "sub_game_type": 0,
      "support_anti_piracy": "1",
      "support_external_update": "",
      "support_game_pad_type": "",
      "support_helper": "0",
      "support_map_preload": "0",
      "support_more_zone": "",
      "support_multi_wegame": "",
      "support_normal_game_streaming": "",
      "support_preload": "0",
      "support_wechat_launch": "",
      "sys_opera": "Windows 7/Windows 8 / Window10",
      "system_needed": {
        "cpu_bits": "64",
        "memory": "1024",
        "sys_version": "win7"
      },
      "system_requirement": "",
      "tags": [
        {
          "weight": 0,
          "tags": [
            "休闲游戏",
            "卡牌战斗",
            "策略棋牌",
            "魔幻",
            "单机",
            "Q版画风",
            "动作冒险"
          ]
        }
      ],
      "taskbar_icon_url": "",
      "tcls_name": "",
      "timeline": "",
      "timeout_interval": "90",
      "tinysetup_min_version": "",
      "top_class": "3",
      "trad_game_name": "",
      "update_failed_launch_minilauncher": "",
      "update_gift_url": "",
      "visible_state": 1,
      "wechat_authentication_force_switch": "",
      "wegame_background_color": "#c4d0e0",
      "wegame_background_image": "http://cdn.rail.tgp.qq.com/info/games/2001006/6bb47941171671175fdb76adb937e69b.jpg",
      "wegame_client": 1,
      "x64_loader_path": "",
      "region_country": {
        "price_state": 1,
        "purchase_state": 1
      },
      "release_config": {
        "sell": {
          "state": 2,
          "time": 1572536838
        },
        "download": {
          "state": 2,
          "time": 1572536838
        },
        "play": {
          "state": 2,
          "time": 1572536838
        },
        "display": {
          "state": 2,
          "time": 1557385112
        }
      }
    }
  ]
}

比如这种数据,我需要拿到数据好,在进行一次json.loads()

import json
a = "[{\"content\":\"t086921wjm7\",\"thumb\":\"http:\\/\\/puui.qpic.cn\\/qqvideo_ori\\/0\\/t086921wjm7_496_280\\/0\",\"type\":\"1\"},{\"content\":\"v0863nclm02\",\"thumb\":\"http:\\/\\/puui.qpic.cn\\/qqvideo_ori\\/0\\/v0863nclm02_496_280\\/0\",\"type\":\"1\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4513950d71595f5adf9081f377e7a774.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4513950d71595f5adf9081f377e7a774.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/a6189769d199568691cf64f880dab4eb.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/a6189769d199568691cf64f880dab4eb.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/7a6ac3f0636f277aec94a7519857c156.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/7a6ac3f0636f277aec94a7519857c156.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/b04dec6f35f10074b2b73eb7be187251.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/b04dec6f35f10074b2b73eb7be187251.jpg\\/1000\",\"type\":\"0\"},{\"content\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4f7712ff9d48c5c6b0987580eb79805e.jpg\\/1000\",\"thumb\":\"http:\\/\\/p.qpic.cn\\/wegame\\/0\\/4f7712ff9d48c5c6b0987580eb79805e.jpg\\/1000\",\"type\":\"0\"}]"

print(json.loads(a))
for i in json.loads(a):
    print(i)

  

上一篇:Python Json模块中dumps、loads、dump、load函数介绍


下一篇:jQuery - 自定义伪类 [:pseudoclass]