From ac856a98bc672039ce9930c40f4e0d8e08d4f77e Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 5 Dec 2019 14:22:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9tap=20=E7=9A=84tags=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=9F=BA=E4=BA=8Eorder=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E8=AF=84=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taptap/taptap_daily_tags.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taptap/taptap_daily_tags.py b/taptap/taptap_daily_tags.py index a7c6594..4c1e3ee 100644 --- a/taptap/taptap_daily_tags.py +++ b/taptap/taptap_daily_tags.py @@ -34,7 +34,7 @@ class TapTapReport: "$part_date"='{self.day}'""" data = self.tga.get_data(sql) pdb.set_trace() - tags = {} + tags_data = {} if data: for line in data: try: @@ -42,10 +42,10 @@ class TapTapReport: temp_dict = tags.get(catename, {}) for tag in tags.split(","): temp_dict[tag] = temp_dict.get(tag, 0) + self.order2score(order) - tags.update(temp_dict) + tags_data.update(temp_dict) except Exception: log.error(f"split {line} failed", exc_info=True) - return tags + return tags_data def order2score(self, order): try: