|
@@ -68,8 +68,8 @@ class Follow:
|
|
|
:param d_share_cnt: 分享量
|
|
|
:return: 满足规则,返回 True;反之,返回 False
|
|
|
"""
|
|
|
- if int(float(d_duration)) >= 30:
|
|
|
- if int(d_width) >= 720 or int(d_height) >= 720:
|
|
|
+ if int(float(d_duration)) >= 40:
|
|
|
+ if int(d_width) >= 0 or int(d_height) >= 0:
|
|
|
if int(d_play_cnt) >= 5000:
|
|
|
if int(d_like_cnt) >= 5000 or int(d_share_cnt) >= 1000:
|
|
|
return True
|
|
@@ -469,12 +469,12 @@ class Follow:
|
|
|
or user_id == "0" \
|
|
|
or video_title == "":
|
|
|
Common.logger(log_type).info("无效视频\n")
|
|
|
- # # 视频发布时间 <= 7 天
|
|
|
- # elif int(time.time()) - int(int(video_send_time) / 1000) > 604800:
|
|
|
- # Common.logger("follow").info("发布时间:{},超过7天\n", time.strftime(
|
|
|
- # "%Y/%m/%d %H:%M:%S", time.localtime(int(video_send_time) / 1000)))
|
|
|
- # cls.person_pcursor = ""
|
|
|
- # break
|
|
|
+ # 视频发布时间 <= 7 天
|
|
|
+ elif int(time.time()) - int(int(video_send_time) / 1000) > 604800:
|
|
|
+ Common.logger("follow").info("发布时间:{},超过7天\n", time.strftime(
|
|
|
+ "%Y/%m/%d %H:%M:%S", time.localtime(int(video_send_time) / 1000)))
|
|
|
+ cls.person_pcursor = ""
|
|
|
+ break
|
|
|
# 判断敏感词
|
|
|
elif cls.download_rule(video_duration, video_width, video_height, video_play_cnt,
|
|
|
video_like_cnt, video_share_cnt) is False:
|
|
@@ -518,12 +518,12 @@ class Follow:
|
|
|
Common.logger("follow").info("添加视频至follow_feeds成功:{}\n", video_title)
|
|
|
cls.get_person_video_count.append(video_id)
|
|
|
|
|
|
- # 抓取足够多数量的视频
|
|
|
- if len(cls.get_person_video_count) >= 1:
|
|
|
- Common.logger(log_type).info('已抓取{}:{}条视频\n', user_name, len(cls.get_person_video_count))
|
|
|
- cls.person_pcursor = ""
|
|
|
- cls.get_person_video_count = []
|
|
|
- return
|
|
|
+ # # 抓取足够多数量的视频
|
|
|
+ # if len(cls.get_person_video_count) >= 1:
|
|
|
+ # Common.logger(log_type).info('已抓取{}:{}条视频\n', user_name, len(cls.get_person_video_count))
|
|
|
+ # cls.person_pcursor = ""
|
|
|
+ # cls.get_person_video_count = []
|
|
|
+ # return
|
|
|
if r.json()["pcursor"] == 'no_more':
|
|
|
Common.logger(log_type).info('没有更多作品了\n')
|
|
|
return
|