As the char ':' is not valid in URL, don't expect it
This commit is contained in:
parent
7970fca93a
commit
c812fd8c16
@ -68,7 +68,7 @@ def parselisten(msg):
|
|||||||
def parseresponse(msg):
|
def parseresponse(msg):
|
||||||
global LAST_URLS
|
global LAST_URLS
|
||||||
try:
|
try:
|
||||||
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ ]+)", msg.text)
|
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ :]+)", msg.text)
|
||||||
for url in urls:
|
for url in urls:
|
||||||
o = urlparse(url)
|
o = urlparse(url)
|
||||||
if o.scheme != "":
|
if o.scheme != "":
|
||||||
|
@ -83,7 +83,7 @@ def parselisten(msg):
|
|||||||
def parseresponse(msg):
|
def parseresponse(msg):
|
||||||
global LAST_URLS
|
global LAST_URLS
|
||||||
if hasattr(msg, "text"):
|
if hasattr(msg, "text"):
|
||||||
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ ]+)", msg.text)
|
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ :]+)", msg.text)
|
||||||
for url in urls:
|
for url in urls:
|
||||||
o = urlparse(url)
|
o = urlparse(url)
|
||||||
if o.scheme != "":
|
if o.scheme != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user