summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/Api.py b/module/Api.py
index 66ba855f1..3480f05b8 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -45,7 +45,7 @@ def permission(bits):
return _Dec
-urlmatcher = re.compile(r"((https?|ftps?|xdcc|sftp):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)", re.IGNORECASE)
+urlmatcher = re.compile(r"((https?|ftps?|xdcc|sftp):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+\-=\\\.&]*)", re.IGNORECASE)
class PERMS:
ALL = 0 # requires no permission, but login
@@ -338,7 +338,8 @@ class Api(Iface):
page = getURL(url)
urls += [x[0] for x in urlmatcher.findall(page)]
- return self.checkURLs(urls)
+ # remove duplicates
+ return self.checkURLs(set(urls))
@permission(PERMS.ADD)