Commit 8917e69c authored by litaolemo's avatar litaolemo

update

parent 4e7f5b16
...@@ -96,7 +96,7 @@ class push_rule(object): ...@@ -96,7 +96,7 @@ class push_rule(object):
else: else:
repost_diff = -100 repost_diff = -100
print(datetime.datetime.now().timestamp(),comment_diff,favoratie_diff,repost_diff) print(datetime.datetime.now().timestamp(),fetch_time_last,fetch_time,comment_diff,favoratie_diff,repost_diff)
if parse_mode == "and": if parse_mode == "and":
if comment_diff / time_diff >= self.comment_per_min and favoratie_diff / time_diff >= self.favorite_per_min and repost_diff / time_diff >= self.repost_per_min: if comment_diff / time_diff >= self.comment_per_min and favoratie_diff / time_diff >= self.favorite_per_min and repost_diff / time_diff >= self.repost_per_min:
return True return True
...@@ -456,11 +456,11 @@ class TRACTATE_PLATFORM(Enum): ...@@ -456,11 +456,11 @@ class TRACTATE_PLATFORM(Enum):
def task_main(): def task_main():
# 实例化数据判断规则 注意高优先级在前 低优先级在后 # 实例化数据判断规则 注意高优先级在前 低优先级在后
push_rule_class1 = push_rule(favorite_count_ni=200,comment_count_ni=200, time_range=10, level=3) push_rule_class1 = push_rule(favorite_count_ni=200,comment_count_ni=200, time_range=10, level=4)
#push_rule_class2 = push_rule(comment_count_ni=20, time_range=5, level=3) push_rule_class2 = push_rule(favorite_count_ni=100,comment_count_ni=100, time_range=10, level=3)
rules_list = [ rules_list = [
push_rule_class1, push_rule_class1,
#push_rule_class2 push_rule_class2
] ]
# 循环处理抓取数据,返回需要添加至后端的数据 # 循环处理抓取数据,返回需要添加至后端的数据
for res_data in scan_from_redis(rules_list): for res_data in scan_from_redis(rules_list):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment