cleanup meta parser

This commit is contained in:
j 2014-05-26 10:23:10 +02:00
commit 67d1814192
6 changed files with 49 additions and 6 deletions

View file

@ -50,6 +50,8 @@ def lookup(id):
url = '%s/Lookup/Book/%s/%s/1' % (base, id, id)
data = read_url(url).decode('utf-8')
r["title"] = find_re(data, "<h2>(.*?)</h2>")
if r["title"] == 'Error!':
return {}
keys = {
'author': 'Author(s)',
'publisher': 'Publisher',