|
@@ -18,11 +18,11 @@ class PiaoQuanPipelineTest:
|
|
|
update_time_stamp = self.item["update_time_stamp"]
|
|
|
if self.platform == "gongzhonghao":
|
|
|
if (
|
|
|
- int(time.time()) - publish_time_stamp
|
|
|
- > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
+ int(time.time()) - publish_time_stamp
|
|
|
+ > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
) and (
|
|
|
- int(time.time()) - update_time_stamp
|
|
|
- > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
+ int(time.time()) - update_time_stamp
|
|
|
+ > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
):
|
|
|
message = "发布时间超过{}天".format(
|
|
|
int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
@@ -31,8 +31,8 @@ class PiaoQuanPipelineTest:
|
|
|
return False
|
|
|
else:
|
|
|
if (
|
|
|
- int(time.time()) - publish_time_stamp
|
|
|
- > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
+ int(time.time()) - publish_time_stamp
|
|
|
+ > 3600 * 24 * int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
|
):
|
|
|
message = "发布时间超过{}天".format(
|
|
|
int(self.rule_dict.get("period", {}).get("max", 1000))
|
|
@@ -63,7 +63,7 @@ class PiaoQuanPipelineTest:
|
|
|
if int(self.rule_dict[key]["max"]) > 0
|
|
|
else 999999999999999
|
|
|
)
|
|
|
- if key == "peroid": # peroid是抓取周期天数
|
|
|
+ if key == "peroid": # peroid是抓取周期天数
|
|
|
continue
|
|
|
else:
|
|
|
flag = int(self.rule_dict[key]["min"]) <= int(self.item[key]) <= max_value
|
|
@@ -108,4 +108,5 @@ class PiaoQuanPipelineTest:
|
|
|
if not self.download_rule_flag():
|
|
|
# 记录相关日志
|
|
|
return False
|
|
|
- return True
|
|
|
+ return True
|
|
|
+
|