|
@@ -40,6 +40,7 @@ class XiaoNianGaoAuthor:
|
|
|
self.user_list = user_list
|
|
|
self.mq = MQ(topic_name="topic_crawler_etl_" + self.env)
|
|
|
self.download_count = 0
|
|
|
+ self.test_account = [58528285, 58527674, 58528085, 58527582, 58527601, 58527612, 58528281, 58528095, 58527323, 58528071, 58527278]
|
|
|
|
|
|
def get_author_list(self):
|
|
|
# 每轮只抓取定量的数据,到达数量后自己退出
|
|
@@ -267,10 +268,14 @@ class XiaoNianGaoAuthor:
|
|
|
trace_id=trace_id,
|
|
|
)
|
|
|
account_level = user_dict['account_level']
|
|
|
+ if video_dict['link'] in self.test_account:
|
|
|
+ flag = pipeline.repeat_video()
|
|
|
+ else:
|
|
|
+ flag = pipeline.process_item()
|
|
|
# if account_level == "P0" or account_level == "P1":
|
|
|
# flag = True
|
|
|
# else:
|
|
|
- flag = pipeline.process_item()
|
|
|
+
|
|
|
if flag:
|
|
|
video_dict["width"] = video_dict["video_width"]
|
|
|
video_dict["height"] = video_dict["video_height"]
|
|
@@ -296,13 +301,3 @@ class XiaoNianGaoAuthor:
|
|
|
message="成功发送 MQ 至 ETL",
|
|
|
)
|
|
|
return True
|
|
|
-
|
|
|
-# if __name__ == "__main__":
|
|
|
-# XNGA = XiaoNianGaoAuthor(
|
|
|
-# platform="xiaoniangao",
|
|
|
-# mode="author",
|
|
|
-# rule_dict={},
|
|
|
-# env="prod",
|
|
|
-# user_list=[{"link": 295640510, "uid": "12334"}],
|
|
|
-# )
|
|
|
-# XNGA.get_author_list()
|