Skip to content

Commit

Permalink
Merge pull request #1 from francium/master
Browse files Browse the repository at this point in the history
Handle empty title for a link.
  • Loading branch information
jhh authored Jul 16, 2017
2 parents 470e2a2 + cd715c9 commit d9431f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion convert-bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
bookmark = {}
# url and title
bookmark['url'] = link.get('href')
bookmark['title'] = link.string.strip()
bookmark['title'] = link.string.strip() if link.string\
else bookmark['url']
# add date
secs = link.get('add_date')
date = datetime.fromtimestamp(int(secs), tz=timezone.utc)
Expand Down

0 comments on commit d9431f9

Please sign in to comment.