|
@@ -69,8 +69,10 @@ def discern_file_format(text):
|
|
|
if result is not None:
|
|
|
return t
|
|
|
else:
|
|
|
- unknown_type = re.findall('[^.\\/:*?"<>|\r\n]+$', text, re.S)
|
|
|
- logger.warning(f'[附件类型识别]未定义的文件类型{unknown_type}')
|
|
|
+ # unknown_type = re.findall('[^.\\/:*?"<>|\r\n]+$', text, re.S)
|
|
|
+ non_type = re.search('([.][a-zA-Z]{3,5})$', text)
|
|
|
+ if non_type is not None:
|
|
|
+ logger.warning(f'[未知附件类型]{non_type.group()}')
|
|
|
return None
|
|
|
|
|
|
|