zhangyong 5 months ago
parent
commit
e3a6974cea
2 changed files with 5 additions and 2 deletions
  1. 1 1
      carry_video/carry_video.py
  2. 4 1
      common/gpt4o_help.py

+ 1 - 1
carry_video/carry_video.py

@@ -105,7 +105,7 @@ class CarryViode:
 
     def insert_pq(self, REDIS_NAME, data, oss_object_key, title, tags, tag_transport_channel):
         logger.info(f"[+] {REDIS_NAME}的{data}开始写入票圈")
-        n_ids = data["pq_ids"]
+        n_ids = str(data["pq_ids"])
         if ',' in n_ids:
             n_id_list = n_ids.split(',')
         else:

+ 4 - 1
common/gpt4o_help.py

@@ -189,6 +189,9 @@ class GPT4o:
                     if content:
                         if re.search(r'[a-zA-Z]', content):
                             content = re.sub(r'[a-zA-Z]', '', content)
+                        if "分享引导脚本" in content:
+                            parsed_data = json.loads(content.strip('"'))
+                            content = parsed_data["分享引导脚本"]
                         return content
                     if attempt == max_retries - 1:
                         return pw_srt_text
@@ -198,6 +201,6 @@ class GPT4o:
 
 
 if __name__ == '__main__':
-    title = '如果有人跟你说苍蝇不叮无缝的蛋,你怎么回'
+    title = '🔴当代女愚公,13年凿穿大山!功在当代、利在千秋的杰作'
     newtitle = GPT4o.get_ai_pw(title)
     print(newtitle)