File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -90,16 +90,19 @@ async def search_result_filter(
90
90
if priority [key ] > 0 and len (res .raw ) != len (group_list ):
91
91
res .raw = [i for i in res .raw if i not in group_list ]
92
92
93
- # 过滤那些无主题的杂图图集
93
+ # 尝试过滤无主题的杂图图集
94
94
if not_themeless_res := [i for i in res .raw if "themeless" not in " " .join (i .tags )]:
95
95
res .raw = not_themeless_res
96
- # 优先找汉化版,并尝试过滤只有评分 1 星的结果;没找到就优先找原版
96
+ # 尝试过滤评分只有 1 星的
97
+ if not_1_star_res := [
98
+ i for i in res .raw if ("-64px" not in PyQuery (i .origin )("div.ir" ).attr ("style" ))
99
+ ]:
100
+ res .raw = not_1_star_res
101
+ # 优先找汉化版;没找到就优先找原版
97
102
if chinese_res := [
98
103
i
99
104
for i in res .raw
100
- if "translated" in " " .join (i .tags )
101
- and "chinese" in " " .join (i .tags )
102
- and ("-64px" not in PyQuery (i .origin )("div.ir" ).attr ("style" ))
105
+ if "translated" in " " .join (i .tags ) and "chinese" in " " .join (i .tags )
103
106
]:
104
107
selected_res = chinese_res [0 ]
105
108
elif not_translated_res := [
You can’t perform that action at this time.
0 commit comments