From 8d766deea208654e07fe65eb9cec87ac5c637556 Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 14 Nov 2019 10:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BB=85=E4=B8=80=E5=A4=A9?= =?UTF-8?q?=E6=9C=89=E8=AE=B0=E5=BD=95=E7=9A=84=EF=BC=8C=E6=9A=82=E4=B8=8D?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taptap/taptap_data_collect.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/taptap/taptap_data_collect.py b/taptap/taptap_data_collect.py index ed4cbb9..17fc75d 100644 --- a/taptap/taptap_data_collect.py +++ b/taptap/taptap_data_collect.py @@ -83,14 +83,18 @@ class TapTapReport: for item in items: all = self.diff_item(all, item) + i = 0 for line in all.values(): try: #print(line) + if line.get("order", 0) >= 1: mydb.insert("taptap_collect", line) + i += 1 except Exception: log.error(f"install 2 db failed ,values={line}", exc_info=True) - + finally: + log.info(f"insert {i} 2 mysql!") def get_gameid_info(self, day): all_data = dict()