hackerbyhobby
commited on
updated regex for URLs
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def boost_probabilities(probabilities: dict, text: str):
|
|
60 |
smishing_boost = 0.30 * smishing_count
|
61 |
other_scam_boost = 0.30 * other_scam_count
|
62 |
|
63 |
-
found_urls = re.findall(r"(https?://[^\s]
|
64 |
if found_urls:
|
65 |
smishing_boost += 0.35
|
66 |
|
|
|
60 |
smishing_boost = 0.30 * smishing_count
|
61 |
other_scam_boost = 0.30 * other_scam_count
|
62 |
|
63 |
+
found_urls = re.findall(r"(https?://[^\s]+|\b(?:[a-zA-Z0-9.-]+\.(?:com|net|org|edu|gov|mil|io|ai|co|info|biz|us|uk|de|fr|es|ru|jp|cn|in|au|ca|br|mx|it|nl|se|no|fi|ch|pl|kr|vn|id|tw|sg|hk))\b)", lower_text)
|
64 |
if found_urls:
|
65 |
smishing_boost += 0.35
|
66 |
|