From efecf08a9fb9578c93f08175c571b2b3083d3f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Wed, 7 Sep 2022 18:45:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=88=99=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 2 +- utils/re_to_jianli.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index 363a7ee..3132f89 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -378,7 +378,7 @@ async def interview_file_insert( try: res = obsClient.getObject('legu-cdn-source', data_in.filenames, path_data + '/' + filename) if res.status < 300: - chk_txt = getText_pdf(filename) + chk_txt = getText_pdf(path_data + '/' + filename) data = fmt_txt(chk_txt) education = data['education'] # 学历int转化 diff --git a/utils/re_to_jianli.py b/utils/re_to_jianli.py index 3636727..00d75f0 100644 --- a/utils/re_to_jianli.py +++ b/utils/re_to_jianli.py @@ -204,6 +204,8 @@ def fmt_txt(chk_str): dict_chk['at_school'] = chk_i time_index = index continue + if '年' in chk_i: + continue time_index = index + 2 dict_chk['at_school'] = school_list[index] + school_list[index + 1] + school_list[index + 2] continue