Browse Source

get_off_videos 兼容single_video开发

luojunhui 6 months ago
parent
commit
2c300b93f3
2 changed files with 14 additions and 1 deletions
  1. 8 0
      applications/const/server_const.py
  2. 6 1
      server/api/get_off_videos.py

+ 8 - 0
applications/const/server_const.py

@@ -71,6 +71,14 @@ class ServerConst:
     # 视频时长(s)
     MAX_VIDEO_DURATION = 300
 
+    # 发布文章源
+
+    # 单发视频的文章源
+    SINGLE_VIDEO = 2
+
+    # 正常长文源
+    ARTICLES_VIDEO = 1
+
 
 
 

+ 6 - 1
server/api/get_off_videos.py

@@ -6,6 +6,7 @@ import time
 import traceback
 
 from applications.log import logging
+from applications.const import server_const
 from applications.functions.forward_request import forward_requests
 
 
@@ -162,7 +163,11 @@ class GetOffVideos(object):
         trace_id是否以search开头
         """
         if self.trace_id.startswith('search'):
-            return True
+            return server_const.ARTICLES_VIDEO
+
+        elif self.trace_id.startswith('video'):
+            return server_const.SEARCH_VIDEO
+
         else:
             return False