From 7192e97376491ea049c761d872e074f171d0ea0d Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 17 Feb 2004 15:36:27 +0000 Subject: [PATCH] Added url to Ebay.auction as per RFE #896118 --- plugins/Ebay.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/Ebay.py b/plugins/Ebay.py index a4fe86503..2968294ae 100644 --- a/plugins/Ebay.py +++ b/plugins/Ebay.py @@ -36,7 +36,6 @@ Accesses eBay.com for various things import re import sets import getopt -import urllib2 __revision__ = "$Id$" @@ -49,6 +48,7 @@ import utils import plugins import ircutils import privmsgs +import webutils import callbacks @@ -112,7 +112,7 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp): return url = 'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=%s' % item try: - irc.reply(self._getResponse(url)) + irc.reply('%s <%s>' % (self._getResponse(url), url)) except EbayError, e: irc.reply(str(e)) @@ -130,10 +130,8 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp): def _getResponse(self, url): try: - fd = urllib2.urlopen(url) - s = fd.read() - fd.close() - except urllib2.HTTPError, e: + s = webutils.getUrl(url) + except webutils.WebError, e: raise EbayError, str(e) resp = [] m = self._invalid.search(s)