zhangyong 9 months ago
parent
commit
8a14abd05d
2 changed files with 14 additions and 1 deletions
  1. 11 0
      common/sql_help.py
  2. 3 1
      video_rewriting/video_processor.py

+ 11 - 0
common/sql_help.py

@@ -197,6 +197,17 @@ class sqlCollect():
         )
         return res
 
+    @classmethod
+    def update_shp_dd_vid_1(cls, vid):
+        """
+        视频号单点修改状态为2
+        """
+        sql = f"""UPDATE dandian_content set has_used = 2 where video_id = '{vid}'"""
+        res = AigcMysqlHelper.update_values(
+            sql=sql
+        )
+        return res
+
     @classmethod
     def select_ks_star_data(cls, profile_id):
         sql = """SELECT * FROM ks_star_info where profile_id = %s"""

+ 3 - 1
video_rewriting/video_processor.py

@@ -327,7 +327,7 @@ class VideoProcessor:
         """
         下载并处理视频
         """
-        if channel_id in ["票圈", "快手创作者版"]:
+        if channel_id in ["票圈", "快手创作者版", "单点视频"]:
             new_video_path = PQ.download_video(video_url, video_path_url, v_id)
             Common.logger(mark).info(f"{channel_id}视频下载成功: {new_video_path}")
         elif channel_id == "视频号历史":
@@ -353,6 +353,8 @@ class VideoProcessor:
                 new_video_path = FFmpeg.add_video_zm(new_video_path, video_path_url, pw_random_id, new_title_re)
             return new_video_path
         else:
+            if channel_id == "单点视频":
+                sqlCollect.update_shp_dd_vid_1(v_id)
             Common.logger(mark).info(f"视频下载失败: {new_video_path}")
             cls.remove_files(video_path_url)
             return new_video_path