Browse Source

文章生成字数: 1000+
公众号修改为: 生活良读

罗俊辉 11 months ago
parent
commit
d9b4bfbfcd
4 changed files with 9 additions and 9 deletions
  1. 2 2
      applications/functions.py
  2. 1 1
      applications/migrate.py
  3. 1 1
      deal/videos_deal.py
  4. 5 5
      test/videos_dev.py

+ 2 - 2
applications/functions.py

@@ -146,7 +146,7 @@ def title_filter(title_list):
     """
     url = "http://61.48.133.26:8179/score_list"
     body = {
-        "account_nickname_list": ["生活情感叁读"],
+        "account_nickname_list": ["生活读"],
         "text_list": title_list,
         "max_time": None,
         "min_time": None,
@@ -155,6 +155,6 @@ def title_filter(title_list):
         "rate": 0.1
     }
     response = requests.post(url=url, headers={}, json=body).json()
-    score_list = response['生活情感叁读']['score_list']
+    score_list = response['生活读']['score_list']
     # title_score_list = list(zip(title_list, score_list))
     return score_list

+ 1 - 1
applications/migrate.py

@@ -26,7 +26,7 @@ def migrate_daily(dt):
     print("{} successfully insert {} rows, totally cost {} seconds".format(dt, len(data), b - a))
 
 
-dt_list = generate_daily_strings("20240701", "20240702")
+dt_list = generate_daily_strings("20240626", "20240702")
 for dt in dt_list:
     print(dt)
     migrate_daily(dt)

+ 1 - 1
deal/videos_deal.py

@@ -85,7 +85,7 @@ class VideoDeal(object):
         socre_list = title_filter(title_list)
         result_list_final = []
         for index, item in enumerate(result_list):
-            if socre_list[index] > 0.4:
+            if socre_list[index] > 0.45:
                 result_list_final.append(item)
         return self.response_obj(result_list_final)
 

+ 5 - 5
test/videos_dev.py

@@ -9,14 +9,14 @@ import requests
 cate: video_return, video_view, video_rov
 """
 
-url = "http://47.99.132.47:8888/videos"
-# url = "http://localhost:8888/videos"
+# url = "http://47.99.132.47:8888/videos"
+url = "http://localhost:8888/videos"
 
 body = {
     "cate": "video_return",
-    "start_date": "2024-06-27",
-    "end_date": "2024-06-28",
-    "topN": 50
+    "start_date": "2024-07-02",
+    "end_date": "2024-07-03",
+    "topN": 500
 }
 a = time.time()
 header = {