From c20749c2ecc1ea912ee5c8b6ad0e0bb62746515e Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 6 Nov 2019 16:02:07 +0800 Subject: [PATCH] add tags field --- taptap/taptap_report_new.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/taptap/taptap_report_new.py b/taptap/taptap_report_new.py index ac166ef..169185e 100644 --- a/taptap/taptap_report_new.py +++ b/taptap/taptap_report_new.py @@ -40,7 +40,6 @@ class TapTapReport: b_d = self.split_order_data(item) for key in b_d: gameid_order.setdefault(key, {}).update(b_d[key]) - pdb.set_trace() for key in gameid_order.keys(): all.setdefault(key, {})['gameid'] = key.split("#")[0] all[key]['catename'] = key.split('#')[1] @@ -79,20 +78,21 @@ class TapTapReport: all[key]['review'] = gameid_info[key]['review'] all[key]['tags'] = gameid_info[key]['tags'] - b_game_info = self.get_gameid_info(self.bday) + b_game_info = self.get_gameid_info(self.bbday) + n_game_info = self.get_gameid_info(self.day) for key in all.keys(): if not all[key].get('title', None): try: - all[key]['title'] = b_game_info[key]['title'] - all[key]['cate'] = b_game_info[key]['cate'] - all[key]['topic'] = b_game_info[key]['topic'] - all[key]['score'] = b_game_info[key]['score'] - all[key]['reserve'] = b_game_info[key]['reserve'] - all[key]['watch'] = b_game_info[key]['watch'] - all[key]['download'] = b_game_info[key]['download'] - all[key]['sell'] = b_game_info[key]['sell'] - all[key]['review'] = b_game_info[key]['review'] - all[key]['tags'] = b_game_info[key]['tags'] + all[key]['title'] = b_game_info[key]['title'] or n_game_info[key]['title'] + all[key]['cate'] = b_game_info[key]['cate'] or n_game_info[key]['cate'] + all[key]['topic'] = b_game_info[key]['topic'] or n_game_info[key]['topic'] + all[key]['score'] = b_game_info[key]['score'] or n_game_info[key]['score'] + all[key]['reserve'] = b_game_info[key]['reserve'] or n_game_info[key]['reserve'] + all[key]['watch'] = b_game_info[key]['watch'] or n_game_info[key]['watch'] + all[key]['download'] = b_game_info[key]['download'] or n_game_info[key]['download'] + all[key]['sell'] = b_game_info[key]['sell'] or n_game_info[key]['sell'] + all[key]['review'] = b_game_info[key]['review'] or n_game_info[key]['review'] + all[key]['tags'] = b_game_info[key]['tags'] or n_game_info[key]['tags'] except Exception: print(f"0={key}")