|
@@ -46,8 +46,8 @@ class kuaishouAuthor():
|
|
|
查询该video_id是否在数据库存在
|
|
|
"""
|
|
|
@classmethod
|
|
|
- def select_videoUrl_id(cls, video_id):
|
|
|
- select_user_sql = f"""select video_id from agc_video_url where video_id='{video_id}' ;"""
|
|
|
+ def select_videoUrl_id(cls, video_id, mark):
|
|
|
+ select_user_sql = f"""select video_id from agc_video_url where video_id='{video_id}' and mark='{mark}' ;"""
|
|
|
user_list = MysqlHelper.get_values(select_user_sql, "prod")
|
|
|
if user_list:
|
|
|
return True
|
|
@@ -136,10 +136,10 @@ class kuaishouAuthor():
|
|
|
video_id = feeds[j].get("photo", {}).get("videoResource").get("hevc", {}).get("videoId", "")
|
|
|
video_url = feeds[j].get('photo', {}).get('photoUrl', "")
|
|
|
|
|
|
- id = cls.select_videoUrl_id(video_id)
|
|
|
+ id = cls.select_videoUrl_id(video_id, mark)
|
|
|
if id:
|
|
|
+ count += 1
|
|
|
if count > 5:
|
|
|
- count += 1
|
|
|
Common.logger("kuaishou").info(
|
|
|
f"重复视频不在抓取该用户,用户主页id:{account_id}")
|
|
|
break
|