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:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
match = re.search("(http|https)://(.*)?/(.*)", string, flags=re.IGNORECASE)
|
match = re.search("(http|https)://(\S*)?/(\S*)", string, flags=re.IGNORECASE)
|
||||||
if match:
|
if match:
|
||||||
url = match[1].lower() + "://" + match[2].lower() + "/" + match[3]
|
url = match[1].lower() + "://" + match[2].lower() + "/" + match[3]
|
||||||
return url
|
return url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user