新增实时数据采集脚本
This commit is contained in:
parent
7cd5f09aa8
commit
4eca358f4d
@ -41,8 +41,11 @@ class RealData(GetFromTga):
|
||||
pass
|
||||
|
||||
try:
|
||||
for l in out_login:
|
||||
logins, login_user, ad_channel = l
|
||||
for lin in out_login:
|
||||
print(f"l={lin}")
|
||||
logins, login_user, ad_channel = lin
|
||||
if ad_channel == "":
|
||||
ad_channel = 'all'
|
||||
data[ad_channel]['logins'] = logins
|
||||
data[ad_channel]['login_user'] = login_user
|
||||
except:
|
||||
@ -78,6 +81,8 @@ class RealData(GetFromTga):
|
||||
print(f"line was {line}")
|
||||
try:
|
||||
shares, share_people, ad_channel = line
|
||||
if ad_channel == "":
|
||||
ad_channel = 'all'
|
||||
data[ad_channel]['shares'] = shares
|
||||
data[ad_channel]['share_people'] = share_people
|
||||
except:
|
||||
|
@ -54,7 +54,7 @@ class CollectGameData():
|
||||
|
||||
def simple_work(line):
|
||||
times = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
|
||||
b_time = (datetime.datetime.now() - datetime.timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
b_time = (datetime.datetime.now() - datetime.timedelta(minutes=120)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
e_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
cc = CollectGameData(times, b_time, e_time)
|
||||
cc.workflow(line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user