better metadata lookup

This commit is contained in:
j 2015-11-03 23:36:19 +01:00
commit 7e37713c95
3 changed files with 20 additions and 10 deletions

View file

@ -15,7 +15,7 @@ base = 'http://www.abebooks.com'
def get_ids(key, value):
ids = []
if key == 'isbn':
url = '%s/servlet/SearchResults?isbn=%s&sts=t' % (base, id)
url = '%s/servlet/SearchResults?isbn=%s&sts=t' % (base, value)
data = read_url(url, unicode=True)
urls = re.compile('href="(/servlet/BookDetailsPL[^"]+)"').findall(data)
if urls: