From 22e192ed112ffb60ade01c2cca47db643f44ce50 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 28 May 2024 17:32:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF=20(#570)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/handle/impl/html_split_handle.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/common/handle/impl/html_split_handle.py b/apps/common/handle/impl/html_split_handle.py index 564f6db49..3116aabfd 100644 --- a/apps/common/handle/impl/html_split_handle.py +++ b/apps/common/handle/impl/html_split_handle.py @@ -37,14 +37,9 @@ def get_encoding(buffer): class HTMLSplitHandle(BaseSplitHandle): def support(self, file, get_buffer): - buffer = get_buffer(file) file_name: str = file.name.lower() if file_name.endswith(".html"): return True - result = detect(buffer) - if result['encoding'] is not None and result['confidence'] is not None and result['encoding'] != 'ascii' and \ - result['confidence'] > 0.5: - return True return False def handle(self, file, pattern_list: List, with_filter: bool, limit: int, get_buffer, save_image):