针对tap 的tags 数据基于order进行评分
This commit is contained in:
parent
d8fdbf0020
commit
ac856a98bc
@ -34,7 +34,7 @@ class TapTapReport:
|
|||||||
"$part_date"='{self.day}'"""
|
"$part_date"='{self.day}'"""
|
||||||
data = self.tga.get_data(sql)
|
data = self.tga.get_data(sql)
|
||||||
pdb.set_trace()
|
pdb.set_trace()
|
||||||
tags = {}
|
tags_data = {}
|
||||||
if data:
|
if data:
|
||||||
for line in data:
|
for line in data:
|
||||||
try:
|
try:
|
||||||
@ -42,10 +42,10 @@ class TapTapReport:
|
|||||||
temp_dict = tags.get(catename, {})
|
temp_dict = tags.get(catename, {})
|
||||||
for tag in tags.split(","):
|
for tag in tags.split(","):
|
||||||
temp_dict[tag] = temp_dict.get(tag, 0) + self.order2score(order)
|
temp_dict[tag] = temp_dict.get(tag, 0) + self.order2score(order)
|
||||||
tags.update(temp_dict)
|
tags_data.update(temp_dict)
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error(f"split {line} failed", exc_info=True)
|
log.error(f"split {line} failed", exc_info=True)
|
||||||
return tags
|
return tags_data
|
||||||
|
|
||||||
def order2score(self, order):
|
def order2score(self, order):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user