|
@@ -235,17 +235,18 @@ class KuaishouauthorScheduling:
|
|
|
viewCount = int(feeds[i].get('photo', {}).get('viewCount', 0))
|
|
|
realLikeCount = int(feeds[i].get('photo', {}).get('realLikeCount', 0))
|
|
|
video_percent = '%.2f' % (realLikeCount / viewCount)
|
|
|
- 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"点赞量:{realLikeCount}\n"
|
|
|
- )
|
|
|
- continue
|
|
|
+ if "special" in rule_dict:
|
|
|
+ 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"点赞量:{realLikeCount}\n"
|
|
|
+ )
|
|
|
+ continue
|
|
|
video_dict = {'video_title': video_title,
|
|
|
'video_id': video_id,
|
|
|
'play_cnt': int(feeds[i].get('photo', {}).get('viewCount', 0)),
|