From f169fdc2a56fbe6fe7ba0e4c77195282c0b0e333 Mon Sep 17 00:00:00 2001 From: STDquantum <405720329@qq.com> Date: Sat, 6 Jan 2024 14:19:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E9=80=89=E7=9A=84=E7=A7=8D?= =?UTF-8?q?=E7=B1=BB=E5=BE=88=E5=B0=91=E4=BC=9A=E5=87=BA=E7=8E=B0=E5=A4=A7?= =?UTF-8?q?=E9=87=8F=E5=86=97=E4=BD=99=E7=9A=84=E6=97=B6=E9=97=B4=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=BD=93=E5=89=8D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=B9=B6=E6=9C=AA=E8=A2=AB=E9=80=89=E4=B8=AD=E9=82=A3?= =?UTF-8?q?=E4=B9=88=E4=B8=8D=E5=88=86=E6=9E=90=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/DataBase/exporter_html.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/DataBase/exporter_html.py b/app/DataBase/exporter_html.py index 4b10e8c..7175949 100644 --- a/app/DataBase/exporter_html.py +++ b/app/DataBase/exporter_html.py @@ -303,11 +303,7 @@ class HtmlExporter(ExporterBase): else: self.progressSignal.emit(1) - if self.is_5_min(timestamp): - str_time = message[8] - f.write( - f'''{{ type:0, text: '{str_time}',is_send:0,avatar_path:'',timestamp:{timestamp}}},''' - ) + flag = True # 如果选的种类很少会出现大量冗余的时间信息,如果当前消息并未被选中那么不分析时间 if type_ == 1 and self.message_types.get(type_): self.text(f, message) elif type_ == 3 and self.message_types.get(type_): @@ -328,6 +324,13 @@ class HtmlExporter(ExporterBase): self.music_share(f, message) elif type_ == 49 and sub_type == 5 and self.message_types.get(4905): self.share_card(f, message) + else: + flag = False + if flag and self.is_5_min(timestamp): + str_time = message[8] + f.write( + f'''{{ type:0, text: '{str_time}',is_send:0,avatar_path:'',timestamp:{timestamp}}},''' + ) f.write(html_end) f.close() self.count_finish_num(1)