This commit is contained in:
Kovid Goyal 2011-01-05 14:39:46 -07:00
parent 59907f91c7
commit 8a70e2dc3a

View File

@ -18,7 +18,6 @@ class xISBN(object):
self._data = [] self._data = []
self._map = {} self._map = {}
self.br = browser()
self.isbn_pat = re.compile(r'[^0-9X]', re.IGNORECASE) self.isbn_pat = re.compile(r'[^0-9X]', re.IGNORECASE)
def purify(self, isbn): def purify(self, isbn):
@ -26,7 +25,7 @@ class xISBN(object):
def fetch_data(self, isbn): def fetch_data(self, isbn):
url = self.QUERY%isbn url = self.QUERY%isbn
data = self.br.open_novisit(url).read() data = browser().open_novisit(url).read()
data = json.loads(data) data = json.loads(data)
if data.get('stat', None) != 'ok': if data.get('stat', None) != 'ok':
return [] return []