|
@@ -106,27 +106,34 @@ class SPH:
|
|
|
old_title = video_obj.get('title').split("\n")[0].split("#")[0]
|
|
|
Common.logger("sph").info(
|
|
|
f"扫描:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
- if share_cnt < 500:
|
|
|
- Common.logger("sph").info(
|
|
|
- f"不符合规则:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
- continue
|
|
|
+ # if share_cnt < 500:
|
|
|
+ # Common.logger("sph").info(
|
|
|
+ # f"不符合规则:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
+ # continue
|
|
|
video_percent = '%.2f' % (share_cnt / like_cnt)
|
|
|
special = float(0.25)
|
|
|
- if float(video_percent) < special:
|
|
|
- Common.logger("sph").info(
|
|
|
- f"不符合规则:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
- continue
|
|
|
- duration = dataHelp.video_duration(video_url)
|
|
|
- if int(duration) < 30 or int(duration) > 720:
|
|
|
+ if like_cnt >= 30000 or like_cnt >= 50000 or (share_cnt >= 300 and float(video_percent) >= special):
|
|
|
+
|
|
|
+ # if float(video_percent) < special:
|
|
|
+ # Common.logger("sph").info(
|
|
|
+ # f"不符合规则:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
+ # continue
|
|
|
+ duration = dataHelp.video_duration(video_url)
|
|
|
+ if int(duration) < 30 or int(duration) > 720:
|
|
|
+ Common.logger("sph").info(
|
|
|
+ f"任务:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt} ,时长:{duration} ")
|
|
|
+ continue
|
|
|
+ cover = video_obj.get('thumb_url')
|
|
|
+ all_data = {"video_id": objectId, "cover": cover, "video_url": video_url, "rule": video_percent, "old_title": old_title}
|
|
|
+ list.append(all_data)
|
|
|
+ if len(list) == int(number):
|
|
|
+ Common.logger("log").info(f"获取视频号视频总数:{len(list)}\n")
|
|
|
+ return list
|
|
|
+ else:
|
|
|
Common.logger("sph").info(
|
|
|
- f"任务:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt} ,时长:{duration} ")
|
|
|
+ f"不符合规则:{task_mark},用户主页id:{url},视频id{objectId} ,分享:{share_cnt},点赞:{like_cnt}")
|
|
|
continue
|
|
|
- cover = video_obj.get('thumb_url')
|
|
|
- all_data = {"video_id": objectId, "cover": cover, "video_url": video_url, "rule": video_percent, "old_title": old_title}
|
|
|
- list.append(all_data)
|
|
|
- if len(list) == int(number):
|
|
|
- Common.logger("log").info(f"获取视频号视频总数:{len(list)}\n")
|
|
|
- return list
|
|
|
+
|
|
|
|
|
|
return list
|
|
|
return []
|