diff --git a/plugins/ShrinkUrl/plugin.py b/plugins/ShrinkUrl/plugin.py index 54c21be18..de994fafe 100644 --- a/plugins/ShrinkUrl/plugin.py +++ b/plugins/ShrinkUrl/plugin.py @@ -256,33 +256,6 @@ class ShrinkUrl(callbacks.PluginRegexp): irc.error(str(e)) x0 = thread(wrap(x0, ['httpUrl'])) - @retry - def _getExpandUrl(self, url): - url = utils.web.urlquote(url) - try: - return self.db.get('Expand', url) - except KeyError: - text = utils.web.getUrl('http://api.longurl.org/v2/expand?url=' + url) - text = text.decode() - text = text.split('', 1)[0] - self.db.set('Expand', url, text) - return text - - @internationalizeDocstring - def expand(self, irc, msg, args, url): - """ - - Returns an expanded version of . - """ - try: - expandurl = self._getExpandUrl(url) - m = irc.reply(expandurl) - if m is not None: - m.tag('shrunken') - except ShrinkError as e: - irc.error(str(e)) - expand = thread(wrap(expand, ['httpUrl'])) - Class = ShrinkUrl # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/plugins/ShrinkUrl/test.py b/plugins/ShrinkUrl/test.py index 971a5b201..35c9169bf 100644 --- a/plugins/ShrinkUrl/test.py +++ b/plugins/ShrinkUrl/test.py @@ -113,11 +113,4 @@ class ShrinkUrlTestCase(ChannelPluginTestCase): shrink.minimumLength.setValue(origLen) shrink.nonSnarfingRegexp.setValue(origRegexp) - def testExpand(self): - self.assertResponse('expand http://x0.no/0l2k', self.udUrl) - self.assertResponse('expand http://x0.no/0l2k', self.udUrl) - self.assertResponse('expand http://x0.no/a53s', self.sfUrl) - self.assertResponse('expand http://x0.no/a53s', self.sfUrl) - self.assertResponse('expand http://x0.no/0l2k', self.udUrl) - # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: