diff --git a/plugins/Sourceforge.py b/plugins/Sourceforge.py index 6a6dccdc4..79730b4c8 100644 --- a/plugins/Sourceforge.py +++ b/plugins/Sourceforge.py @@ -246,7 +246,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp): _sfTitle = re.compile(r'Detail:(\d+) - ([^<]+)', re.I) _linkType = re.compile(r'(\w+ \w+|\w+): Tracker Detailed View', re.I) def sfSnarfer(self, irc, msg, match): - r"https?://(?:www\.)?(?:sourceforge|sf)\.net/tracker/\S+" + r"https?://(?:www\.)?(?:sourceforge|sf)\.net/tracker/(?:index\.php)?\?(?:&?func=detail|&?aid=\d+|&?group_id=\d+|&?atid=\d+)+" if not self.snarfer: return url = match.group(0) diff --git a/test/test_Sourceforge.py b/test/test_Sourceforge.py index b2c4230c8..a430fb1fc 100644 --- a/test/test_Sourceforge.py +++ b/test/test_Sourceforge.py @@ -77,32 +77,6 @@ class SourceforgeTest(PluginTestCase, PluginDocumentation): self.assertNotError('http://sf.net/tracker/?'\ 'func=detail&aid=540223&group_id=235&atid=300235') # test that it works - -## def testHttpsSnarfer(self): -## s = r';.*Status.*: \w+;' -## self.assertRegexp('https://sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=589953&group_id=58965&atid=489447', s) -## self.assertRegexp('https://sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=712761&group_id=58965&atid=489450', s) -## self.assertRegexp('https://sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=540223&group_id=235&atid=300235', s) -## self.assertRegexp('https://sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=561547&group_id=235&atid=200235', s) -## self.assertRegexp('http://sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=400942&group_id=235&atid=390395', s) - -## # test that it works without index.php -## self.assertNotError('https://sourceforge.net/tracker/?'\ -## 'func=detail&aid=540223&group_id=235&atid=300235') -## # test that it works with www -## self.assertNotError('https://www.sourceforge.net/tracker/?'\ -## 'func=detail&aid=540223&group_id=235&atid=300235') -## # test that it works with www and without index.php -## self.assertNotError('https://www.sourceforge.net/tracker/index.php?'\ -## 'func=detail&aid=540223&group_id=235&atid=300235') -## # test that it works with www and without index.php -## self.assertNotError('https://sf.net/tracker/index.php?'\ -## 'func=detail&aid=540223&group_id=235&atid=300235') self.assertNotError('https://sourceforge.net/tracker/?' 'func=detail&atid=105470&aid=827260&group_id=5470')