Browse Source

修改过滤逻辑2

罗俊辉 10 months ago
parent
commit
56d79cfecf
2 changed files with 15 additions and 15 deletions
  1. 6 6
      routes/AccountArticleRank.py
  2. 9 9
      test/rank_dev.py

+ 6 - 6
routes/AccountArticleRank.py

@@ -162,12 +162,12 @@ class AccountArticleRank(object):
         else:
             ranked_1 = []
         # rank2
-        # if article_list2_ori:
-        #     for item in article_list2_ori:
-        #         item['score'] = 100
-        #     ranked_2 = sorted(article_list2_ori, key=lambda x: x['crawlerViewCount'], reverse=True)
-        # else:
-        ranked_2 = []
+        if article_list2_ori:
+            for item in article_list2_ori:
+                item['score'] = 100
+            ranked_2 = sorted(article_list2_ori, key=lambda x: x['crawlerViewCount'], reverse=True)
+        else:
+            ranked_2 = []
 
         # rank3
         if article_list3_ori:

File diff suppressed because it is too large
+ 9 - 9
test/rank_dev.py


Some files were not shown because too many files changed in this diff