escape strings

This commit is contained in:
j 2024-09-11 22:52:01 +01:00
commit 41edea1862
20 changed files with 74 additions and 74 deletions

View file

@ -32,7 +32,7 @@ def get_data(isbn):
r[key] = ''
if key == 'pages' and r[key]:
r[key] = int(r[key])
desc = find_re(data, '<h2>Description:<\/h2>(.*?)<div ')
desc = find_re(data, r'<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.':