mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Merge pull request #1035 from GLolol/shrinkurl/httpUrl
ShrinkUrl: use httpUrl instead of url in wrap()
This commit is contained in:
commit
ed62d4d0be
@ -200,7 +200,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
ln = thread(wrap(ln, ['url']))
|
ln = thread(wrap(ln, ['httpUrl']))
|
||||||
|
|
||||||
@retry
|
@retry
|
||||||
def _getTinyUrl(self, url):
|
def _getTinyUrl(self, url):
|
||||||
@ -227,7 +227,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.errorPossibleBug(str(e))
|
irc.errorPossibleBug(str(e))
|
||||||
tiny = thread(wrap(tiny, ['url']))
|
tiny = thread(wrap(tiny, ['httpUrl']))
|
||||||
|
|
||||||
_xrlApi = 'http://metamark.net/api/rest/simple'
|
_xrlApi = 'http://metamark.net/api/rest/simple'
|
||||||
@retry
|
@retry
|
||||||
@ -256,7 +256,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
xrl = thread(wrap(xrl, ['url']))
|
xrl = thread(wrap(xrl, ['httpUrl']))
|
||||||
|
|
||||||
_gooApi = 'https://www.googleapis.com/urlshortener/v1/url'
|
_gooApi = 'https://www.googleapis.com/urlshortener/v1/url'
|
||||||
@retry
|
@retry
|
||||||
@ -289,7 +289,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
goo = thread(wrap(goo, ['url']))
|
goo = thread(wrap(goo, ['httpUrl']))
|
||||||
|
|
||||||
_ur1Api = 'http://ur1.ca/'
|
_ur1Api = 'http://ur1.ca/'
|
||||||
_ur1Regexp = re.compile(r'<a href="(?P<url>[^"]+)">')
|
_ur1Regexp = re.compile(r'<a href="(?P<url>[^"]+)">')
|
||||||
@ -319,7 +319,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
ur1 = thread(wrap(ur1, ['url']))
|
ur1 = thread(wrap(ur1, ['httpUrl']))
|
||||||
|
|
||||||
_x0Api = 'http://api.x0.no/?%s'
|
_x0Api = 'http://api.x0.no/?%s'
|
||||||
@retry
|
@retry
|
||||||
@ -346,7 +346,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
x0 = thread(wrap(x0, ['url']))
|
x0 = thread(wrap(x0, ['httpUrl']))
|
||||||
|
|
||||||
@retry
|
@retry
|
||||||
def _getExpandUrl(self, url):
|
def _getExpandUrl(self, url):
|
||||||
@ -373,7 +373,7 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
except ShrinkError as e:
|
except ShrinkError as e:
|
||||||
irc.error(str(e))
|
irc.error(str(e))
|
||||||
expand = thread(wrap(expand, ['url']))
|
expand = thread(wrap(expand, ['httpUrl']))
|
||||||
|
|
||||||
Class = ShrinkUrl
|
Class = ShrinkUrl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user