|
@@ -234,11 +234,11 @@ class Recommend:
|
|
|
|
|
|
# 下载视频
|
|
|
Common.download_method(log_type, 'video', video_title, video_url)
|
|
|
- # 获取视频时长
|
|
|
- video_info = cls.get_video_info_from_local(log_type, "./videos/" + video_title + "/video.mp4")
|
|
|
- video_width = str(video_info[0])
|
|
|
- video_height = str(video_info[1])
|
|
|
- duration = video_info[2]
|
|
|
+ # # 获取视频时长
|
|
|
+ # video_info = cls.get_video_info_from_local(log_type, "./videos/" + video_title + "/video.mp4")
|
|
|
+ # video_width = str(video_info[0])
|
|
|
+ # video_height = str(video_info[1])
|
|
|
+ # duration = video_info[2]
|
|
|
# 下载封面
|
|
|
Common.download_method(log_type, 'cover', video_title, cover_url)
|
|
|
# 保存视频信息至 "./videos/{download_video_title}/info.txt"
|
|
@@ -246,12 +246,12 @@ class Recommend:
|
|
|
+ "/" + "info.txt", "a", encoding="UTF-8") as f_a:
|
|
|
f_a.write("ggdc" + str(int(time.time())) + "\n" +
|
|
|
str(video_title) + "\n" +
|
|
|
- str(int(float(duration))) + "\n" +
|
|
|
+ '100' + "\n" +
|
|
|
'100000' + "\n" +
|
|
|
'100000' + "\n" +
|
|
|
'100000' + "\n" +
|
|
|
'100000' + "\n" +
|
|
|
- str(video_width) + '*' + str(video_height) + "\n" +
|
|
|
+ '1920*1080' + "\n" +
|
|
|
str(int(time.time())) + "\n" +
|
|
|
'刚刚都传小程序' + "\n" +
|
|
|
str(cover_url) + "\n" +
|
|
@@ -278,8 +278,6 @@ class Recommend:
|
|
|
"推荐榜",
|
|
|
video_title,
|
|
|
our_video_link,
|
|
|
- int(duration),
|
|
|
- str(video_width) + '*' + str(video_height),
|
|
|
cover_url,
|
|
|
video_url]]
|
|
|
time.sleep(1)
|