Ignore spurious tags.
Please refer to #172. The spurious '<a></a>' tag leads to a crash; with or without any text within.
This commit is contained in:
parent
115c9651f8
commit
45ab8034cd
8
buku.py
8
buku.py
@ -1665,10 +1665,14 @@ class BukuDb:
|
||||
|
||||
for tag in html_tags:
|
||||
# Extract comment from <dd> tag
|
||||
try:
|
||||
if (is_nongeneric_url(tag['href'])):
|
||||
continue
|
||||
except KeyError as e:
|
||||
continue
|
||||
|
||||
desc = None
|
||||
comment_tag = tag.findNextSibling('dd')
|
||||
if (is_nongeneric_url(tag['href'])):
|
||||
continue
|
||||
|
||||
if comment_tag:
|
||||
desc = comment_tag.text[0:comment_tag.text.find('\n')]
|
||||
|
Loading…
x
Reference in New Issue
Block a user