Refine location_rule with title #314
This commit is contained in:
3
core.py
3
core.py
@@ -197,7 +197,8 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
|||||||
print(conf.location_rule())
|
print(conf.location_rule())
|
||||||
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
||||||
if 'title' in conf.location_rule() and len(title) > 100:
|
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
|
||||||
json_data['title'] = title
|
json_data['title'] = title
|
||||||
|
|||||||
Reference in New Issue
Block a user