cleanup
This commit is contained in:
parent
73a60e73d7
commit
07cd885b0a
1 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,9 @@ def get_data(isbn):
|
|||
r[key] = ''
|
||||
if key == 'pages' and r[key]:
|
||||
r[key] = int(r[key])
|
||||
r['description'] = strip_tags(find_re(data, '<h2>Description:<\/h2>(.*?)<div ')).strip()
|
||||
desc = find_re(data, '<h2>Description:<\/h2>(.*?)<div ')
|
||||
desc = desc.replace('<br /><br />', ' ').replace('<br /> ', ' ').replace('<br />', ' ')
|
||||
r['description'] = strip_tags(desc).strip()
|
||||
if r['description'] == u'Description of this item is not available at this time.':
|
||||
r['description'] = ''
|
||||
r['cover'] = find_re(data, '<img src="(.*?)" alt="Book cover').replace('._SL160_', '')
|
||||
|
|
Loading…
Reference in a new issue