日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
用Python分析了20萬(wàn)場(chǎng)吃雞數(shù)據(jù)

首先,神槍鎮(zhèn)樓

創(chuàng)新互聯(lián)是一家專業(yè)提供龍沙企業(yè)網(wǎng)站建設(shè),專注與網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站設(shè)計(jì)、成都h5網(wǎng)站建設(shè)、小程序制作等業(yè)務(wù)。10年已為龍沙眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)公司優(yōu)惠進(jìn)行中。

背景

最近老板愛(ài)上了吃雞(手游:全軍出擊),經(jīng)常拉著我們開(kāi)黑,只能放棄午休的時(shí)間,陪老板在沙漠里奔波。 上周在在微信游戲頻道看戰(zhàn)績(jī)的時(shí)候突發(fā)奇想,是不是可以通過(guò)這個(gè)方式抓取到很多戰(zhàn)斗數(shù)據(jù),然后分析看看有什么規(guī)律。

秀一波戰(zhàn)績(jī),開(kāi)黑情況下我們團(tuán)隊(duì)吃雞率非常高,近100場(chǎng)吃雞次數(shù)51次

簡(jiǎn)單評(píng)估了一下,覺(jué)得可行,咱就開(kāi)始。

Step 1 分析數(shù)據(jù)接口

第一步當(dāng)然是把這些戰(zhàn)績(jī)數(shù)據(jù)采集下來(lái),首先我們需要了解頁(yè)面背后的故事。去看看頁(yè)面是如何獲取戰(zhàn)斗數(shù)據(jù)的。

使用Charles抓包

抓包實(shí)現(xiàn)

在Mac下推薦使用工具Charles來(lái)從協(xié)議層抓取手機(jī)上的流量,原理就是在Mac上開(kāi)啟一個(gè)代*理*服務(wù)器,然后將手機(jī)的網(wǎng)絡(luò)代*理設(shè)置為Mac,這樣手機(jī)上的所有流量都會(huì)經(jīng)過(guò)我們的代*理*服務(wù)器了。 大致流程如下:

https加密流量的處理

在實(shí)際操作的時(shí)候發(fā)現(xiàn)微信所有的流量都走了HTTPS,導(dǎo)致我們的抓到的都是加密數(shù)據(jù),對(duì)我們沒(méi)有任何參考意義。 經(jīng)過(guò)研究,可以通過(guò)在手機(jī)和電腦都安裝Charles根證書的方式來(lái)實(shí)現(xiàn)對(duì)Https流量的分析,具體操作可以參考:

  • charles mac下https抓包和iphone https抓包
  • 解決Charles無(wú)法正常抓包iOS 11中的Https請(qǐng)求

安裝證書后,我們的流量大致是這樣子的

經(jīng)過(guò)上述的配置,我們已經(jīng)可以讀取到https的請(qǐng)求和響應(yīng)數(shù)據(jù)了,如下圖所示。

  • windows下用findler可以實(shí)現(xiàn)相同的功能
  • 其實(shí)這就是一個(gè)非常典型的中間人場(chǎng)景

數(shù)據(jù)接口

接下來(lái)就根據(jù)這些數(shù)據(jù)來(lái)找出我們需要的接口了,經(jīng)過(guò)分析,主要涉及三個(gè)接口

  • 獲取用戶信息接口
  • 獲取用戶戰(zhàn)績(jī)列表接口
  • 獲取用戶指定戰(zhàn)績(jī)?cè)敿?xì)信息接口

下面我們一個(gè)一個(gè)看

1. 獲取用戶信息接口

  • request
API /cgi-bin/gamewap/getpubgmdatacenterindex
方法 GET
參數(shù) openid、pass_ticket
cookie key pass_ticket、uin、pgv_pvid、sd_cookie_crttime、sd_userid
  • response
 
 
 
  1.     "user_info": { 
  2.         "openid": "oODfo0pjBQkcNuR4XLTQ321xFVws", 
  3.         "head_img_url": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM5hSWxxxxxUQPwW9ibxxxx9DlxLTsKWk97oWpDI0rg/96", 
  4.         "nick_name": "望", 
  5.         "role_name": "xxxx", 
  6.         "zone_area_id": 0, 
  7.         "plat_id": 1 
  8.     }, 
  9.     "battle_info": { 
  10.         "total_1": 75, 
  11.         "total_10": 336, 
  12.         "total_game": 745, 
  13.         "total_kill": 1669 
  14.     }, 
  15.     "battle_list": [{ 
  16.         "map_id": 1, 
  17.         "room_id": "6575389198189071197", 
  18.         "team_id": 57, 
  19.         "dt_event_time": 1530953799, 
  20.         "rank_in_ds": 3, 
  21.         "times_kill": 1, 
  22.         "label": "前五", 
  23.         "team_type": 1, 
  24.         "award_gold": 677, 
  25.         "mode": 0 
  26.     }], 
  27.     "appitem": { 
  28.         "AppID": "wx13051697527efc45", 
  29.         "IconURL": "https://mmocgame.qpic.cn/wechatgame/mEMdfrX5RU0dZFfNEdCsMJpfsof1HE0TP3cfZiboX0ZPxqh5aZnHjxPFXUGgsXmibe/0", 
  30.         "Name": "絕地求生 全軍出擊", 
  31.         "BriefName": "絕地求生 全軍出擊", 
  32.         "Desc": "官方正版絕地求生手游", 
  33.         "Brief": "槍戰(zhàn) | 808.2M", 
  34.         "WebURL": "https://game.weixin.qq.com/cgi-bin/h5/static/detail_v2/index.html?wechat_pkgid=detail_v2&appid=wx13051697527efc45&show_bubble=0", 
  35.         "DownloadInfo": { 
  36.             "DownloadURL": "https://itunes.apple.com/cn/app/id1304987143", 
  37.             "DownloadFlag": 5 
  38.         }, 
  39.         "Status": 0, 
  40.         "AppInfoFlag": 45, 
  41.         "Label": [], 
  42.         "AppStorePopUpDialogConfig": { 
  43.             "Duration": 1500, 
  44.             "Interval": 172800, 
  45.             "ServerTimestamp": 1531066098 
  46.         }, 
  47.         "HasEnabledChatGroup": false, 
  48.         "AppType": 0, 
  49.         "game_tag_list": ["絕地求生", "正版還原", "好友開(kāi)黑", "百人對(duì)戰(zhàn)", "超大地圖"], 
  50.         "recommend_reason": "正版絕地求生,荒野射擊", 
  51.         "size_desc": "808.2M" 
  52.     }, 
  53.     "is_guest": true, 
  54.     "is_blocked": false, 
  55.     "errcode": 0, 
  56.     "errmsg": "ok" 
  • 分析

openid是用戶的惟一標(biāo)識(shí)。

2. 獲取用戶戰(zhàn)績(jī)列表接口

  • request
API /cgi-bin/gamewap/getpubgmbattlelist
方法 GET
參數(shù) openid、pass_ticket、plat_id、after_time、limit
cookie key pass_ticket、uin、pgv_pvid、sd_cookie_crttime、sd_userid
  • response
 
 
 
  1. "errcode": 0, 
  2. "errmsg": "ok", 
  3. "next_after_time": 1528120556, 
  4. "battle_list": [{ 
  5.     "map_id": 1, 
  6.     "room_id": "6575389198111172597", 
  7.     "team_id": 57, 
  8.     "dt_event_time": 1530953799, 
  9.     "rank_in_ds": 3, 
  10.     "times_kill": 1, 
  11.     "label": "前五", 
  12.     "team_type": 1, 
  13.     "award_gold": 677, 
  14.     "mode": 0 
  15. }, { 
  16.     "map_id": 1, 
  17.     "room_id": "6575336498940384115", 
  18.     "team_id": 11, 
  19.     "dt_event_time": 1530941404, 
  20.     "rank_in_ds": 5, 
  21.     "times_kill": 2, 
  22.     "label": "前五", 
  23.     "team_type": 1, 
  24.     "award_gold": 632, 
  25.     "mode": 0 
  26. }], 
  27. "has_next": true 
  28. }
  • 分析

這個(gè)接口用after_time來(lái)進(jìn)行分頁(yè),遍歷獲取時(shí)可以根據(jù)接口響應(yīng)的has_next和next_after_time來(lái)判斷是否還有下一頁(yè)的數(shù)據(jù)。

列表里面的room_id是每一場(chǎng)battle的惟一標(biāo)識(shí)。

3. 獲取用戶戰(zhàn)績(jī)?cè)斍榻涌?/h3>
  • request
API /cgi-bin/gamewap/getpubgmbattledetail
方法 GET
參數(shù) openid、pass_ticket、room_id
cookie key pass_ticket、uin、pgv_pvid、sd_cookie_crttime、sd_userid
  • request
 
 
 
  1. "errcode": 0, 
  2. "errmsg": "ok", 
  3. "base_info": { 
  4.     "nick_name": "柚茶", 
  5.     "head_img_url": "http://wx.qlogo.cn/mmhead/xxxx/96", 
  6.     "dt_event_time": 1528648165, 
  7.     "team_type": 4, 
  8.     "rank": 1, 
  9.     "player_count": 100, 
  10.     "role_sex": 1, 
  11.     "label": "大吉大利", 
  12.     "openid": "oODfo0s1w5lWjmxxxxxgQkcCljXQ" 
  13. }, 
  14. "battle_info": { 
  15.     "award_gold": 622, 
  16.     "times_kill": 6, 
  17.     "times_head_shot": 0, 
  18.     "damage": 537, 
  19.     "times_assist": 3, 
  20.     "survival_duration": 1629, 
  21.     "times_save": 0, 
  22.     "times_reborn": 0, 
  23.     "vehicle_kill": 1, 
  24.     "forward_distance": 10140, 
  25.     "driving_distance": 5934, 
  26.     "dead_poison_circle_no": 6, 
  27.     "top_kill_distance": 223, 
  28.     "top_kill_distance_weapon_use": 2924130819, 
  29.     "be_kill_user": { 
  30.         "nick_name": "小旭", 
  31.         "head_img_url": "http://wx.qlogo.cn/mmhead/ibLButGMnqJNFsUtStNEV8tzlH1QpwPiaF9kxxxxx66G3ibjic6Ng2Rcg/96", 
  32.         "weapon_use": 20101000001, 
  33.         "openid": "oODfo0qrPLExxxxc0QKjFPnPxyI" 
  34.     }, 
  35.     "label": "大吉大利" 
  36. }, 
  37. "team_info": { 
  38.     "user_list": [{ 
  39.         "nick_name": "ooo", 
  40.         "times_kill": 6, 
  41.         "assist_count": 3, 
  42.         "survival_duration": 1638, 
  43.         "award_gold": 632, 
  44.         "head_img_url": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4k4RXdyxavNxxxxUjcX6Tl47MNNV1dZDliazRKRg", 
  45.         "openid": "oODfo0xxxxf1bRAXE-q-lEezK0k" 
  46.     }, { 
  47.         "nick_name": "我吃炒肉", 
  48.         "times_kill": 2, 
  49.         "assist_count": 2, 
  50.         "survival_duration": 1502, 
  51.         "award_gold": 583,
  52.         "head_img_url": "http://wx.qlogo.cn/mmhead/sTJptKvBQLKd5SAAjOF0VrwiapUxxxxFffxoDUcrVjYbDf9pNENQ", 
  53.         "openid": "oODfo0gIyDxxxxZpUrSrpapZSDT0" 
  54.     }] 
  55. }, 
  56. "is_guest": true, 
  57. "is_blocked": false 
  58. }
  • 分析
  • 這個(gè)接口響應(yīng)了戰(zhàn)斗的詳細(xì)信息,包括殺*敵數(shù)、爆*頭數(shù)、救人數(shù)、跑動(dòng)距離等等,足夠我們分析了。
  • 這個(gè)接口還響應(yīng)了是被誰(shuí)殺死的以及組團(tuán)成員的openid,利用這個(gè)特性我們這可無(wú)限深度的發(fā)散爬取更多用戶的數(shù)據(jù)。

至于cookie中的息pass_ticket等信息肯定是用于權(quán)限認(rèn)證的,在上述的幾次請(qǐng)求中這些信息都沒(méi)有變化,所以我們不需要深研其是怎么算出來(lái)的,只需要抓包提取到默認(rèn)信息后填到代碼里面就可以用了。

Step 2 爬取數(shù)據(jù)

接口已經(jīng)確定下來(lái)了,接下來(lái)就是去抓取足夠量的數(shù)據(jù)了。

使用requests請(qǐng)求接口獲取數(shù)據(jù)

 
 
 
  1. url = 'https://game.weixin.qq.com/cgi-bin/gamewap/getpubgmdatacenterindex?openid=%s&plat_id=0&uin=&key=&pass_ticket=%s' % (openid, settings.pass_ticket) 
  2.     r = requests.get(url=url, cookies=settings.def_cookies, headers=settings.def_headers, timeout=(5.0, 5.0)) 
  3.     tmp = r.json() 
  4.     wfile = os.path.join(settings.Res_UserInfo_Dir, '%s.txt' % (rediskeys.user(openid)))  
  5.     with codecs.open(wfile, 'w', 'utf-8') as wf: 
  6.         wf.write(simplejson.dumps(tmp, indent=2, sort_keys=True, ensure_ascii=False))

參照這種方式我們可以很快把另外兩個(gè)接口寫好。

使用redis來(lái)標(biāo)記已經(jīng)爬取過(guò)的信息

在上述接口中我們可能從用戶A的入口進(jìn)去找到用戶B的openid,然后從用戶B的入口進(jìn)去又找到用戶A的openid,為了避免重復(fù)采集,所以我們需要記錄下哪些信息是我們采集過(guò)的。 核心代碼片斷:

 
 
 
  1. # rediskeys.user_battle_list 根據(jù)openid獲取存在redis中的key值 
  2. def user_battle_list(openid): 
  3.     return 'ubl_%s' % (openid) 
  4. # 在提取battle list之前,首先判斷這用用戶的數(shù)據(jù)是否已經(jīng)提取過(guò)了 
  5. if settings.DataRedis.get(rediskeys.user_battle_list(openid)): 
  6.         return True 
  7. # 在提取battle list之后,需要在redis中記錄用戶信息 
  8. settings.DataRedis.set(rediskeys.user_battle_list(openid), 1)

使用celery來(lái)管理隊(duì)列

celery是一個(gè)非常好用的分布式隊(duì)列管理工具,我這次只打算在我自己的電腦上運(yùn)行,所以并沒(méi)有用到分布式的功能。 我們創(chuàng)建三個(gè)task和三個(gè)queue

 
 
 
  1. task_queues = ( 
  2.     Queue('queue_get_battle_info', exchange=Exchange('priority', type='direct'), routing_key='gbi'), 
  3.     Queue('queue_get_battle_list', exchange=Exchange('priority', type='direct'), routing_key='gbl'),
  4.     Queue('queue_get_user_info', exchange=Exchange('priority', type='direct'), routing_key='gui'), 
  5. )   
  6. task_routes = ([ 
  7.     ('get_battle_info', {'queue': 'queue_get_battle_info'}), 
  8.     ('get_battle_list', {'queue': 'queue_get_battle_list'}), 
  9.     ('get_user_info', {'queue': 'queue_get_user_info'}), 
  10. ],)

然后在task中控制API請(qǐng)求和Redis數(shù)據(jù)實(shí)現(xiàn)完整的任務(wù)邏輯,如:

 
 
 
  1. @app.task(name='get_battle_list') 
  2. def get_battle_list(openid, plat_id=None, after_time=0, update_time=None): 
  3.     # 判斷是否已經(jīng)取過(guò)用戶戰(zhàn)績(jī)列表信息
  4.     if settings.DataRedis.get(rediskeys.user_battle_list(openid)): 
  5.         return True  
  6.     if not plat_id: 
  7.         try: 
  8.             # 提取用戶信息 
  9.             us = handles.get_user_info_handles(openid) 
  10.             plat_id=us['plat_id'] 
  11.         except Exception as e: 
  12.             print 'can not get user plat_id', openid, traceback.format_exc() 
  13.             return False 
  14.     # 提取戰(zhàn)績(jī)列表 
  15.     battle_list = handles.get_battle_list_handle(openid, plat_id, after_time=0, update_time=None)     
  16.     # 為每一場(chǎng)戰(zhàn)斗創(chuàng)建異步獲取詳情任務(wù) 
  17.     for room_id in battle_list: 
  18.         if not settings.DataRedis.get(rediskeys.user_battle(openid, room_id)): 
  19.             get_battle_info.delay(openid, plat_id, room_id)
  20.     return True

開(kāi)始抓取

因?yàn)槲覀兪前l(fā)散是爬蟲,所以需要給代碼一個(gè)用戶的入口,所以需要手動(dòng)創(chuàng)建一個(gè)用戶的采集任務(wù)

 
 
 
  1. from tasks.all import get_battle_list   
  2. my_openid = 'oODfo0oIErZI2xxx9xPlVyQbRPgY' 
  3. my_platid = '0'   
  4. get_battle_list.delay(my_openid, my_platid, after_time=0, update_time=None)

有入口之后我們就用celery來(lái)啟動(dòng)worker去開(kāi)始爬蟲

 
 
 
  1. # 啟動(dòng)獲取用戶詳情worker 
  2. celery -A tasks.all worker -c 5 --queue=queue_get_user_info --loglevel=info -n get_user_info@%h  
  3. # 啟動(dòng)獲取戰(zhàn)績(jī)列表worker 
  4. celery -A tasks.all worker -c 5 --queue=queue_get_battle_list --loglevel=info -n get_battle_list@%h   
  5. # 啟動(dòng)獲取戰(zhàn)績(jī)?cè)斍閣orker 
  6. celery -A tasks.all worker -c 30 --queue=queue_get_battle_info --loglevel=info -n get_battle_info@%h

這樣我們的爬蟲就可以愉快的跑起來(lái)了。再通過(guò)celery-flower來(lái)查看執(zhí)行情況。

 
 
 
  1. celery flower -A tasks.all --broker=redis://:$REDIS_PASS@$REDIS_HOST:$REDIS_PORT/10

通過(guò)flower,我們可以看到運(yùn)行的效率還是非常不錯(cuò)的。

在執(zhí)行過(guò)程中會(huì)發(fā)現(xiàn)get_battle_list跑太快,導(dǎo)致get_battle_info即使開(kāi)了30個(gè)并發(fā)都還會(huì)積壓很多,所以需要適時(shí)的去停一下這些worker。 在我們抓到20萬(wàn)條信息之后就可以停下來(lái)了。

Step 3 數(shù)據(jù)分析

分析方案

20萬(wàn)場(chǎng)戰(zhàn)斗的數(shù)據(jù)已經(jīng)抓取好了,全部分成json文件存在我本地磁盤上,接下來(lái)就做一些簡(jiǎn)單的分析。 python在數(shù)據(jù)分析領(lǐng)域也非常強(qiáng)大,有很多非常優(yōu)秀的庫(kù),如pandas和NumPy,可惜我都沒(méi)有學(xué)過(guò),而且對(duì)于一個(gè)高考數(shù)學(xué)只考了70幾分的人來(lái)說(shuō),數(shù)據(jù)分析實(shí)在是難,所以就自己寫了一個(gè)非常簡(jiǎn)單的程序來(lái)做一些淺度分析。 需要進(jìn)行深度分析,又不想自己爬蟲的大??梢月?lián)系我打包這些數(shù)據(jù)。

 
 
 
  1. # coding=utf-8 
  2. import os
  3. import json 
  4. import datetime 
  5. import math  
  6. from conf import settings   
  7. class UserTeamTypeData: 
  8.     def __init__(self, team_type, player_count): 
  9.         self.team_type = team_type
  10.         self.player_count = player_count 
  11.         self.label = {} 
  12.         self.dead_poison_circle_no = {} 
  13.         self.count = 0 
  14.         self.damage = 0 
  15.         self.survival_duration = 0  # 生存時(shí)間 
  16.         self.driving_distance = 0 
  17.         self.forward_distance = 0 
  18.         self.times_assist = 0  # 助攻 
  19.         self.times_head_shot = 0 
  20.         self.times_kill = 0 
  21.         self.times_reborn = 0  # 被救次數(shù) 
  22.         self.times_save = 0  # 救人次數(shù) 
  23.         self.top_kill_distance = [] 
  24.         self.top_kill_distance_weapon_use = {} 
  25.         self.vehicle_kill = 0  # 車輛殺死 
  26.         self.award_gold = 0 
  27.         self.times_reborn_by_role_sex = {0: 0, 1: 0}  # 0 男 1 女 
  28.         self.times_save_by_role_sex = {0: 0, 1: 0}  # 0 男 1 女  
  29.     def update_dead_poison_circle_no(self, dead_poison_circle_no): 
  30.         if dead_poison_circle_no in self.dead_poison_circle_no: 
  31.             self.dead_poison_circle_no[dead_poison_circle_no] += 1 
  32.         else: 
  33.             self.dead_poison_circle_no[dead_poison_circle_no] = 1  
  34.     def update_times_reborn_and_save_by_role_sex(self, role, times_reborn, times_save): 
  35.         if role not in self.times_reborn_by_role_sex: 
  36.             return  
  37.         self.times_reborn_by_role_sex[role] += times_reborn 
  38.         self.times_save_by_role_sex[role] += times_save  
  39.     def update_top_kill_distance_weapon_use(self, weaponid): 
  40.         if weaponid not in self.top_kill_distance_weapon_use: 
  41.             self.top_kill_distance_weapon_use[weaponid] = 1 
  42.         else: 
  43.             self.top_kill_distance_weapon_use[weaponid] += 1 
  44.  
  45. class UserBattleData:  
  46.     def __init__(self, openid): 
  47.         self.openid = openid 
  48.         self.team_type_res = {} 
  49.         self.label = {} 
  50.         self.hour_counter = {} 
  51.         self.weekday_counter = {} 
  52.         self.usetime = 0 
  53.         self.day_record = set() 
  54.         self.battle_counter = 0  
  55.     def get_avg_use_time_per_day(self): 
  56.         # print "get_avg_use_time_per_day:", self.openid, self.usetime, len(self.day_record), self.usetime / len(self.day_record) 
  57.         return self.usetime / len(self.day_record)  
  58.     def update_label(self, lable): 
  59.         if lable in self.label: 
  60.             self.label[lable] += 1
  61.          else: 
  62.             self.label[lable] = 1  
  63.     def get_team_type_data(self, team_type, player_count): 
  64.         player_count = int(math.ceil(float(player_count) / 10)) 
  65.         team_type_key = '%d_%d' % (team_type, player_count)  
  66.         if team_type_key not in self.team_type_res: 
  67.             userteamtypedata = UserTeamTypeData(team_type, player_count) 
  68.             self.team_type_res[team_type_key] = userteamtypedata 
  69.         else: 
  70.             userteamtypedata = self.team_type_res[team_type_key]  
  71.         return userteamtypedata  
  72.     def update_user_time_property(self, dt_event_time): 
  73.         dt_event_time = datetime.datetime.fromtimestamp(dt_event_time) 
  74.         hour = dt_event_time.hour 
  75.         if hour in self.hour_counter: 
  76.             self.hour_counter[hour] += 1 
  77.         else: 
  78.             self.hour_counter[hour] = 1  
  79.         weekday = dt_event_time.weekday() 
  80.         if weekday in self.weekday_counter: 
  81.             self.weekday_counter[weekday] += 1 
  82.         else: 
  83.             self.weekday_counter[weekday] = 1  
  84.         self.day_record.add(dt_event_time.date()) 
  85.  
  86.     def update_battle_info_by_room(self, roomid): 
  87.         # print '  load ', self.openid, roomid 
  88.         file = os.path.join(settings.Res_UserBattleInfo_Dir, self.openid, '%s.txt' % roomid)  
  89.         with open(file, 'r') as rf: 
  90.             battledata = json.load(rf)  
  91.         self.battle_counter += 1 
  92.         base_info = battledata['base_info'] 
  93.         self.update_user_time_property(base_info['dt_event_time']) 
  94.         battle_info = battledata['battle_info']  
  95.         userteamtypedata = self.get_team_type_data(base_info['team_type'], base_info['player_count']) 
  96.         userteamtypedata.count += 1 
  97.         userteamtypedata.award_gold += battle_info['award_gold'] 
  98.         userteamtypedata.damage += battle_info['damage'] 
  99.         userteamtypedata.update_dead_poison_circle_no(battle_info['dead_poison_circle_no']) 
  100.         userteamtypedata.driving_distance += battle_info['driving_distance'] 
  101.         userteamtypedata.forward_distance += battle_info['forward_distance'] 
  102.         self.update_label(battle_info['label']) 
  103.         userteamtypedata.survival_duration += battle_info['survival_duration'] 
  104.         self.usetime += battle_info['survival_duration']/60 
  105.         userteamtypedata.times_assist += battle_info['times_assist']
  106.         userteamtypedata.times_head_shot += battle_info['times_head_shot']  分享題目:用Python分析了20萬(wàn)場(chǎng)吃雞數(shù)據(jù)
    當(dāng)前路徑:http://m.5511xx.com/article/coosdjo.html