|
@@ -168,18 +168,19 @@ class DouyinauthorScheduling:
|
|
|
comment_count = int(data[i].get('statistics').get('comment_count')) # 评论
|
|
|
# collect_count = data[i].get('statistics').get('collect_count') # 收藏
|
|
|
share_count = int(data[i].get('statistics').get('share_count')) # 转发
|
|
|
- video_percent = '%.2f' % (share_count / digg_count)
|
|
|
- special = float(rule_dict.get("special"))
|
|
|
- if float(video_percent) < special:
|
|
|
- Common.logger(log_type, crawler).info(f"不符合条件:分享/点赞-{video_percent}\n")
|
|
|
- AliyunLogger.logging(
|
|
|
- code="2004",
|
|
|
- platform=crawler,
|
|
|
- mode=log_type,
|
|
|
- env=env,
|
|
|
- message=f"不符合条件:分享/点赞-{video_percent},点赞量-{digg_count}\n"
|
|
|
- )
|
|
|
- continue
|
|
|
+ if share_count != 0:
|
|
|
+ video_percent = '%.2f' % (share_count / digg_count)
|
|
|
+ special = float(rule_dict.get("special"))
|
|
|
+ if float(video_percent) < special:
|
|
|
+ Common.logger(log_type, crawler).info(f"不符合条件:分享/点赞-{video_percent}\n")
|
|
|
+ AliyunLogger.logging(
|
|
|
+ code="2004",
|
|
|
+ platform=crawler,
|
|
|
+ mode=log_type,
|
|
|
+ env=env,
|
|
|
+ message=f"不符合条件:分享/点赞-{video_percent},点赞量-{digg_count}\n"
|
|
|
+ )
|
|
|
+ continue
|
|
|
video_dict = {'video_title': video_title,
|
|
|
'video_id': video_id,
|
|
|
'play_cnt': 0,
|