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:
Arun Prakash Jana 2017-07-18 23:00:37 +05:30
parent 115c9651f8
commit 45ab8034cd
No known key found for this signature in database
GPG Key ID: A75979F35C080412

View File

@ -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')]