Commit d095bdbe by lichenggang

过滤平台关键字

parent bb59a6d5
Showing with 8 additions and 1 deletions
...@@ -14,8 +14,15 @@ msgapi_url = 'http://api.ichunt.com/msg/sendMessageByAuto' ...@@ -14,8 +14,15 @@ msgapi_url = 'http://api.ichunt.com/msg/sendMessageByAuto'
def parse_msg(msg): def parse_msg(msg):
lines = msg.split('\n') lines = msg.split('\n')
msgs = [] filter_lines = []
for line in lines: for line in lines:
for filter_kw in filter_plat_kw:
if filter_kw not in line:
filter_lines.append(line)
msgs = []
for line in filter_lines:
if '错误率' in line and float(wrong_ratio_pat.findall(line)[0]) >= 80: if '错误率' in line and float(wrong_ratio_pat.findall(line)[0]) >= 80:
msgs.append(line) msgs.append(line)
return msgs return msgs
......
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 sign in to comment