feat: advanced url processing, whitespaces issue
This commit is contained in:
parent
2c4e7c3370
commit
4f12a7c903
2
util.py
2
util.py
@ -302,7 +302,7 @@ def get_url_from_input(string):
|
||||
else:
|
||||
return False
|
||||
|
||||
match = re.search("(http|https)://(.*)?/(.*)", string, flags=re.IGNORECASE)
|
||||
match = re.search("(http|https)://(\S*)?/(\S*)", string, flags=re.IGNORECASE)
|
||||
if match:
|
||||
url = match[1].lower() + "://" + match[2].lower() + "/" + match[3]
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user