This commit is contained in:
SpudGunMan
2024-10-04 21:38:32 -07:00
parent 99b4e5a1b5
commit d57dfb1055
2 changed files with 10 additions and 3 deletions
+5 -2
View File
@@ -114,9 +114,12 @@ def parse_log_file(file_path):
for word in shameWordList:
if word in line.lower():
if line not in log_data['shameList']:
log_data['shameList'].append(line)
line = line.replace('Ignoring Message:', '')
line = line.replace('|', '')
line = line.replace('INFO', '')
line = line.replace('DEBUG', '')
log_data['shameList'].append(0, line)
# get the user who sent the message
user_match = re.search(r'From: (\w+)', line)
if user_match:
+5 -1
View File
@@ -124,7 +124,11 @@ def parse_log_file(file_path):
for word in shameWordList:
if word in line.lower():
if line not in log_data['shameList']:
log_data['shameList'].append(line)
line = line.replace('Ignoring Message:', '')
line = line.replace('|', '')
line = line.replace('INFO', '')
line = line.replace('DEBUG', '')
log_data['shameList'].append(0, line)
# get the user who sent the message
user_match = re.search(r'From: (\w+)', line)