anoved / ReadingListReader

Python library to read contents of Safari Reading List. Includes scripts to output as CSV or "bookmarks" file format and to upload to Instapaper.
http://anoved.net/2012/02/reading-list-reader/
MIT License
149 stars 19 forks source link

DateLastFetched KeyError in Mac OS X 10.8.3 #4

Closed anoved closed 11 years ago

anoved commented 11 years ago

The recent Mac OS X 10.8.3 update introduced some changes to the structure of the Reading List section of the Safari bookmarks file. (Specifically, some properties are now nested in a ReadingListNonSync dict.) As a result, readinglistlib scripts will likely fail.

We can't complain because the bookmark file format is undocumented and ReadingListReader is therefore unsupported. Nevertheless, I'll work on a fix.

anoved commented 11 years ago

Commit da40fa4dba4418109222c93eaabfc5f8e8dbe67a now looks for DateLastFetched in the bookmark's ReadingListNonSync dict if it is not found in the ReadingList dict, resolving the cases that prompted this issue. Some of my Reading List bookmarks have a DateLastFetched value in both dicts, but some only have it in ReadingListNonSync. Previously I assumed it was always present in the ReadingList dict.

I am not sure if this change was actually introduced in 10.8.3 or if it is simply a scenario I haven't encountered before.