|
@@ -85,19 +85,19 @@ class CarryViode:
|
|
headers = {
|
|
headers = {
|
|
'Content-Type': 'application/json'
|
|
'Content-Type': 'application/json'
|
|
}
|
|
}
|
|
- response = requests.request("POST", url, headers=headers, data=payload)
|
|
|
|
- response = response.json()
|
|
|
|
- code = response["code"]
|
|
|
|
- if code == 0:
|
|
|
|
- data = response["data"]["data"]
|
|
|
|
- content_type = data['content_type']
|
|
|
|
- if content_type == 'note':
|
|
|
|
- return "note","note"
|
|
|
|
- video_url = data["video_url_list"][0]["video_url"]
|
|
|
|
- original_title = data["title"]
|
|
|
|
- return video_url, original_title
|
|
|
|
- else:
|
|
|
|
- return None,None
|
|
|
|
|
|
+ for i in range(3):
|
|
|
|
+ response = requests.request("POST", url, headers=headers, data=payload)
|
|
|
|
+ response = response.json()
|
|
|
|
+ code = response["code"]
|
|
|
|
+ if code == 0:
|
|
|
|
+ data = response["data"]["data"]
|
|
|
|
+ content_type = data['content_type']
|
|
|
|
+ if content_type == 'note':
|
|
|
|
+ return "note","note"
|
|
|
|
+ video_url = data["video_url_list"][0]["video_url"]
|
|
|
|
+ original_title = data["title"]
|
|
|
|
+ return video_url, original_title
|
|
|
|
+ return None,None
|
|
except Exception as e:
|
|
except Exception as e:
|
|
logger.error(f"[+] 快手{url}获取视频链接失败,失败信息{e}")
|
|
logger.error(f"[+] 快手{url}获取视频链接失败,失败信息{e}")
|
|
return None, None
|
|
return None, None
|
|
@@ -325,7 +325,8 @@ class CarryViode:
|
|
if width < height: # 判断是否需要修改为竖屏
|
|
if width < height: # 判断是否需要修改为竖屏
|
|
video_path = FFmpeg.update_video_h_w(video_path, file_path)
|
|
video_path = FFmpeg.update_video_h_w(video_path, file_path)
|
|
if data['trailer_share'] == "AI片尾引导":
|
|
if data['trailer_share'] == "AI片尾引导":
|
|
- pw_srt_text = '老友们,这个视频说的太好了,请你在看完之后,不要私藏,分享给身边的亲人朋友,转发传递这份美好,这不仅是分享一个好视频,更是在传递一份深厚的祝福和好运,愿每个看到这消息的人,都能收获健康长寿和平安,希望您在看完后能够回传给我,并且把这条视频再传给3个群和3个好友,祝愿你我,健健康康,平平安安,因为3个数字代表着健康和平安,这么好的视频,千万不要在你的手里终止了,分享给群友们,他们看到以后一定会感谢你的,感谢分享,感谢传递'
|
|
|
|
|
|
+ # pw_srt_text = '老友们,这个视频说的太好了,请你在看完之后,不要私藏,分享给身边的亲人朋友,转发传递这份美好,这不仅是分享一个好视频,更是在传递一份深厚的祝福和好运,愿每个看到这消息的人,都能收获健康长寿和平安,希望您在看完后能够回传给我,并且把这条视频再传给3个群和3个好友,祝愿你我,健健康康,平平安安,因为3个数字代表着健康和平安,这么好的视频,千万不要在你的手里终止了,分享给群友们,他们看到以后一定会感谢你的,感谢分享,感谢传递'
|
|
|
|
+ pw_srt_text = GPT4o.get_ai_pw(title)
|
|
voice = data['trailer_share_audio']
|
|
voice = data['trailer_share_audio']
|
|
if voice:
|
|
if voice:
|
|
if ',' in voice:
|
|
if ',' in voice:
|