dont download available books, parse worldcat covers
This commit is contained in:
parent
a1833cc937
commit
d96d4300c2
2 changed files with 7 additions and 3 deletions
|
|
@ -62,6 +62,12 @@ def lookup(id):
|
|||
data['isbn'] = []
|
||||
if isbn not in data['isbn']:
|
||||
data['isbn'].append(isbn)
|
||||
cover = doc.xpath('//img[@class="cover"]')
|
||||
if cover:
|
||||
data['cover'] = cover[0].attrib['src']
|
||||
if data['cover'].startswith('//'):
|
||||
data['cover'] = 'http:' + data['cover']
|
||||
|
||||
if 'author' in data:
|
||||
data['author'] = [data['author']]
|
||||
if 'title' in data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue