diff --git a/nfuck/__init__.py b/nfuck/__init__.py index d2a6ee1..fec0c47 100644 --- a/nfuck/__init__.py +++ b/nfuck/__init__.py @@ -41,9 +41,12 @@ async def on_check(message: Message): data = (await client.get(entity.url)).text total_score = 0 results.append(f"{sanitize_link(entity.url)}") - for score, explanation, match in explain_verification(data): - results.append(f"{match.span()}: {explanation}") + counts = {} + for score, explanation, _ in explain_verification(data): + counts[explanation] = counts.get(explanation, 0) + 1 total_score += score + for explanation, count in counts.items(): + results.append(f"{explanation}: x{count}") results.append(f"Total score: {total_score}") results.append("") if results: