Skip to content

Commit

Permalink
match urls like x.com
Browse files Browse the repository at this point in the history
  • Loading branch information
mario31274 committed Nov 27, 2023
1 parent 1a3e813 commit 6472b53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion antilinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
RequestType = Literal["discord_deleted_user", "owner", "user", "user_strict"]

LINKS: Pattern[str] = re.compile(
r"(\|\|)?(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?(\|\|)?" # type: ignore
r"(\|\|)?(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w]?[-\d\w]{0,253}[\d\w]\.)+[\w]{2,63}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?(\|\|)?" # type: ignore
)


Expand Down

0 comments on commit 6472b53

Please sign in to comment.