Dusting URL stacking modules: fixing error when using channel list as response
This commit is contained in:
parent
3c51b1f03b
commit
be776405e3
@ -82,9 +82,10 @@ def parseresponse(msg):
|
|||||||
try:
|
try:
|
||||||
urls = re.findall("www.reddit.com(/\w/\w+/?)", msg.text)
|
urls = re.findall("www.reddit.com(/\w/\w+/?)", msg.text)
|
||||||
for url in urls:
|
for url in urls:
|
||||||
if msg.channel not in LAST_SUBS:
|
for recv in msg.receivers:
|
||||||
LAST_SUBS[msg.channel] = list()
|
if recv not in LAST_SUBS:
|
||||||
LAST_SUBS[msg.channel].append(url)
|
LAST_SUBS[recv] = list()
|
||||||
|
LAST_SUBS[recv].append(url)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -89,7 +89,8 @@ def parseresponse(msg):
|
|||||||
if o.scheme != "":
|
if o.scheme != "":
|
||||||
if o.netloc == "" and len(o.path) < 10:
|
if o.netloc == "" and len(o.path) < 10:
|
||||||
continue
|
continue
|
||||||
if msg.channel not in LAST_URLS:
|
for recv in msg.receivers:
|
||||||
LAST_URLS[msg.channel] = list()
|
if recv not in LAST_URLS:
|
||||||
LAST_URLS[msg.channel].append(url)
|
LAST_URLS[recv] = list()
|
||||||
|
LAST_URLS[recv].append(url)
|
||||||
return msg
|
return msg
|
||||||
|
Loading…
Reference in New Issue
Block a user