| def is_spam(message: str) -> bool: | |
| import re | |
| # Check for suspicious keywords | |
| spam_keywords = ["์ ๊ท", "์ ๊ธ", "์ถ๊ธ", "์ฆ๊ถ", "์ถ์ฒ์ฃผ", | |
| "ํํ", "์ ์ฑ๊ด๊ณ ", "๋ฌด๋ฃ์ถ์ฒ", "์ ๋ฌ", | |
| "์ข ๋ชฉ", "์์น", "์ต์", "ํนํ"] | |
| for keyword in spam_keywords: | |
| if keyword in message: | |
| return True | |
| # Check for links in message | |
| link_pattern = re.compile(r'(http|https:\/\/|www\.|bit\.ly|me2\.kr|kakao[^ ]*|talk[^ ]*|naver\.me|ko\.gl)[^ ]+') | |
| if re.search(link_pattern, message): | |
| return True | |
| # Check for percentages | |
| percent_pattern = re.compile(r'\d{1,3}%') | |
| if re.search(percent_pattern, message): | |
| return True | |
| return False |