ソースを参照

修改过滤逻辑2

罗俊辉 10 ヶ月 前
コミット
56d79cfecf
2 ファイル変更15 行追加15 行削除
  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:

ファイルの差分が大きいため隠しています
+ 9 - 9
test/rank_dev.py


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません