Skip to content

Commit

Permalink
fix:url match(#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Oct 18, 2024
1 parent 179f29b commit 4d578f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def get_channel_url(text):
Get the url from text
"""
url = None
urlRegex = r"((http|https)://)?((([0-9]{1,3}\.){3}[0-9]{1,3})|([a-zA-Z0-9-]+\.[a-zA-Z]{2,}))(:[0-9]+)?(/[a-zA-Z0-9-._~:/?#[\]@!$&'()*+,;=%]*)?"
urlRegex = r"\b((https?):\/\/)?(([\w-]+\.)+[\w-]+)(:[0-9]{1,5})?(\/[^\s]*)?\b"
url_search = re.search(
urlRegex,
text,
Expand Down

0 comments on commit 4d578f6

Please sign in to comment.