소스 검색

抖音、快手、视频号增加不符合规则日志

zhangyong 11 달 전
부모
커밋
4617c3fbf0
3개의 변경된 파일20개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      data_channel/douyin.py
  2. 5 0
      data_channel/kuaishou.py
  3. 7 0
      data_channel/shipinhao.py

+ 8 - 0
data_channel/douyin.py

@@ -71,10 +71,14 @@ class DY:
                         # comment_count = int(data[i].get('statistics').get('comment_count'))  # 评论
                         share_count = int(data[i].get('statistics').get('share_count'))  # 转发
                         if share_count < 500:
+                            Common.logger("dy").info(
+                                f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,分享:{share_count},点赞{digg_count}")
                             continue
                         video_percent = '%.2f' % (share_count / digg_count)
                         special = float(0.25)
                         if float(video_percent) < special:
+                            Common.logger("dy").info(
+                                f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,分享:{share_count},点赞{digg_count} ")
                             continue
                         duration = dataHelp.video_duration(video_url)
                         if int(duration) >= 45:
@@ -84,4 +88,8 @@ class DY:
                             if len(list) == int(number):
                                 Common.logger("log").info(f"获取抖音视频总数:{len(list)}\n")
                                 return list
+                        else:
+                            Common.logger("dy").info(
+                                f"任务:{task_mark},用户主页id:{url_id},视频id{video_id} ,分享:{share_count},点赞{digg_count} ,时长:{duration} ")
+
         return list

+ 5 - 0
data_channel/kuaishou.py

@@ -72,11 +72,13 @@ class KS:
                     video_id = feeds[i].get("photo", {}).get("videoResource").get("hevc", {}).get("videoId", "")
                 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:
@@ -85,5 +87,8 @@ class KS:
                         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
 

+ 7 - 0
data_channel/shipinhao.py

@@ -99,10 +99,14 @@ class SPH:
                             share_cnt = int(obj['forward_count'])  # 分享
                             like_cnt = int(obj['like_count'])  # 点赞
                             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) >= 45:
@@ -112,6 +116,9 @@ class SPH:
                                 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} ")
             return list
         return []