merge bookmark files with Python 3 pyparsing

Viewed 53

I've downloaded an older Python 3 script which should be able to merge bookmark files. But this line always produces an error. Unfortunately I am absolute beginner in Python and I am also confused by pyparsing docs.

#using a private attribute of ParseResults to associate rows with hyperlinks
hyperlinks = dict([(pos,href) for href,pos in parseresults._ParseResults__tokdict.get('HyperLink',[])])

error:

hyperlinks = dict([(pos,href) for href,pos in parseresults._ParseResults__tokdict.get('HyperLink',[])])
AttributeError: 'str' object has no attribute 'get'

Searched in the internet, but this is very special topic.

0 Answers
Related