mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
eBay changed their expired auction message
This commit is contained in:
parent
20bcb697a1
commit
d59310603c
@ -81,7 +81,7 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
|
|
||||||
_reopts = re.I | re.S
|
_reopts = re.I | re.S
|
||||||
_invalid = re.compile(r'(is invalid, still pending, or no longer in our '
|
_invalid = re.compile(r'(is invalid, still pending, or no longer in our '
|
||||||
r'database)', _reopts)
|
r'database|has been removed by eBay)', _reopts)
|
||||||
_info = re.compile(r'<title>eBay item (\d+) \([^)]+\) - ([^<]+)</title>',
|
_info = re.compile(r'<title>eBay item (\d+) \([^)]+\) - ([^<]+)</title>',
|
||||||
_reopts)
|
_reopts)
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
resp = []
|
resp = []
|
||||||
m = self._invalid.search(s)
|
m = self._invalid.search(s)
|
||||||
if m:
|
if m:
|
||||||
raise EbayError, 'That auction %s' % m.group(1)
|
raise EbayError, 'That auction %s.' % m.group(1)
|
||||||
m = self._info.search(s)
|
m = self._info.search(s)
|
||||||
if m:
|
if m:
|
||||||
(num, desc) = m.groups()
|
(num, desc) = m.groups()
|
||||||
|
@ -35,7 +35,8 @@ class EbayTest(ChannelPluginTestCase):
|
|||||||
def testAuction(self):
|
def testAuction(self):
|
||||||
self.assertNotError('auction 3053641570')
|
self.assertNotError('auction 3053641570')
|
||||||
# test 'Invalid Item' checking
|
# test 'Invalid Item' checking
|
||||||
self.assertRegexp('auction 2357056673', 'That auction is invalid')
|
self.assertRegexp('auction 2357056673',
|
||||||
|
r'That auction (is invalid|has been removed)')
|
||||||
self.assertError('auction foobar')
|
self.assertError('auction foobar')
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user