mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed the snarfer to allow https links.
This commit is contained in:
parent
b6fb71d5a5
commit
bd7f1f9389
@ -216,7 +216,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
||||
_sfTitle = re.compile(r'Detail:(\d+) - ([^<]+)</title>', re.I)
|
||||
_linkType = re.compile(r'(\w+ \w+|\w+): Tracker Detailed View', re.I)
|
||||
def sourceforgeSnarfer(self, irc, msg, match):
|
||||
r"http://(?:www\.)?sourceforge.net/tracker/index.php\?func=detail&aid=\d+&group_id=\d+&atid=\d+"
|
||||
r"https?://(?:www\.)?sourceforge.net/tracker/index.php\?func=detail&aid=\d+&group_id=\d+&atid=\d+"
|
||||
url = match.group(0)
|
||||
fd = urllib2.urlopen(url)
|
||||
s = fd.read()
|
||||
|
@ -37,7 +37,7 @@ class SourceforgeTest(PluginTestCase, PluginDocumentation):
|
||||
plugins = ('Sourceforge',)
|
||||
def testBugs(self):
|
||||
self.assertNotError('bugs')
|
||||
self.assertResponse('bugs alkjfi83hfa8', 'Can\'t find the "Bugs" link.')
|
||||
self.assertResponse('bugs alkjfi83fa8', 'Can\'t find the "Bugs" link.')
|
||||
self.assertNotError('bugs gaim')
|
||||
m = self.getMsg('bugs gaim')
|
||||
n = re.search('#(\d+)', m.args[1]).group(1)
|
||||
@ -58,6 +58,12 @@ class SourceforgeTest(PluginTestCase, PluginDocumentation):
|
||||
self.assertResponse('http://sourceforge.net/tracker/index.php?'\
|
||||
'func=detail&aid=712761&group_id=58965&atid=489450',
|
||||
'Feature Request #712761: PyPI searching and announcements')
|
||||
self.assertResponse('https://sourceforge.net/tracker/index.php?'\
|
||||
'func=detail&aid=589953&group_id=58965&atid=489447',
|
||||
'Bug #589953: Logger doesn\'t log QUITs.')
|
||||
self.assertResponse('https://sourceforge.net/tracker/index.php?'\
|
||||
'func=detail&aid=712761&group_id=58965&atid=489450',
|
||||
'Feature Request #712761: PyPI searching and announcements')
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user