As the char ':' is not valid in URL, don't expect it

This commit is contained in:
nemunaire 2015-10-03 15:32:36 +02:00
parent 7970fca93a
commit c812fd8c16
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ def parselisten(msg):
def parseresponse(msg):
global LAST_URLS
try:
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ ]+)", msg.text)
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ :]+)", msg.text)
for url in urls:
o = urlparse(url)
if o.scheme != "":

View File

@ -83,7 +83,7 @@ def parselisten(msg):
def parseresponse(msg):
global LAST_URLS
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:
o = urlparse(url)
if o.scheme != "":