|
@@ -73,22 +73,24 @@ class KS:
|
|
|
status = sqlCollect.is_used(task_mark, video_id, mark, channel_id)
|
|
|
if status:
|
|
|
video_id = feeds[i].get("photo", {}).get("id", "")
|
|
|
- cover_url = feeds[i].get('photo', {}).get('coverUrl', "")
|
|
|
- video_url = feeds[i].get('photo', {}).get('photoUrl', "")
|
|
|
- # viewCount = int(feeds[i].get('photo', {}).get('viewCount', 0))
|
|
|
- realLikeCount = int(feeds[i].get('photo', {}).get('realLikeCount', 0))
|
|
|
- if realLikeCount < 10000:
|
|
|
- Common.logger("ks").info(f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,点赞数:{realLikeCount} ")
|
|
|
- continue
|
|
|
- duration = dataHelp.video_duration(video_url)
|
|
|
- if int(duration) >= 45:
|
|
|
- all_data = {"video_id": video_id, "cover": cover_url, "video_url": video_url, "rule": realLikeCount}
|
|
|
- list.append(all_data)
|
|
|
- if len(list) == int(number):
|
|
|
- Common.logger("log").info(f"获取快手视频总数:{len(list)}\n")
|
|
|
- return list
|
|
|
- else:
|
|
|
- Common.logger("ks").info(f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,点赞数:{realLikeCount} ,时长:{duration} ")
|
|
|
+ status = sqlCollect.is_used(task_mark, video_id, mark, channel_id)
|
|
|
+ if status:
|
|
|
+ cover_url = feeds[i].get('photo', {}).get('coverUrl', "")
|
|
|
+ video_url = feeds[i].get('photo', {}).get('photoUrl', "")
|
|
|
+ # viewCount = int(feeds[i].get('photo', {}).get('viewCount', 0))
|
|
|
+ realLikeCount = int(feeds[i].get('photo', {}).get('realLikeCount', 0))
|
|
|
+ if realLikeCount < 10000:
|
|
|
+ Common.logger("ks").info(f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,点赞数:{realLikeCount} ")
|
|
|
+ continue
|
|
|
+ duration = dataHelp.video_duration(video_url)
|
|
|
+ if int(duration) >= 45:
|
|
|
+ all_data = {"video_id": video_id, "cover": cover_url, "video_url": video_url, "rule": realLikeCount}
|
|
|
+ list.append(all_data)
|
|
|
+ if len(list) == int(number):
|
|
|
+ Common.logger("log").info(f"获取快手视频总数:{len(list)}\n")
|
|
|
+ return list
|
|
|
+ else:
|
|
|
+ Common.logger("ks").info(f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,点赞数:{realLikeCount} ,时长:{duration} ")
|
|
|
|
|
|
return list
|
|
|
|