From 3d7bcf927cde542d7165cbdfd60554d74e1a2962 Mon Sep 17 00:00:00 2001 From: Mathhew Date: Wed, 23 Sep 2020 09:34:14 +0800 Subject: [PATCH] Refine location_rule with title #314 --- core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core.py b/core.py index 0ae674d..b447aa1 100755 --- a/core.py +++ b/core.py @@ -197,7 +197,8 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON print(conf.location_rule()) location_rule = eval(conf.location_rule().replace("actor","'多人作品'")) if 'title' in conf.location_rule() and len(title) > 100: - location_rule = eval(conf.location_rule().replace("title",'number')) + shorttitle = title[0:100] + "..." + location_rule = location_rule.replace(title, shorttitle) # 返回处理后的json_data json_data['title'] = title