Unable to access the Safari Reading List Plist

I am trying to load my Safari Reading list in Applescript but dont seem to have access. Am I missing something?

Please describe the problem you are experiencing a little more. How are you trying to get the Safari reading list? If possible, show your code. When you say you don’t have access, what is the error you are receiving?

Dear Mark,

I have two seperate issues. If I try to access the Safari plist in situ I hit this error:

System Events got an error: Can’t get contents of property list file “M1 Mac:Users:ewan:Library:Safari:Bookmarks.plist”.

However if I copy the plist to MyDocuments I get other errors like this (which are more likely coding mistakes on my part):

Can’t make {{WebBookmarkUUID:“602AC7BC-752E-4DF0-95DD-22CCCA588DB5”, title:“History”, WebBookmarkType:“WebBookmarkTypeProxy”, WebBookmarkIdentifier:“History”}, {WebBookmarkUUID:“E77649AE-70FF-495D-86DD-789FAD70B095”, children:{{WebBookmarkUUID:“5B143976-6319-4FBC-83D1-87DBC0DD2708”, ReadingListNonSync:{neverFetchMetadata:false}, URLString:“REDACTED”, Sync:{ServerID:“D1FC2B46-7F1D-4564-AAE7-3B48AD4912CB”, |data|:«data

62706C6973743030D4010203040506070A582476657273696F6E592461726368697665725424746FF0B000B010B030B080B0B0B100B280B2B0000000000000201000000000000006F00000000000000000000000000000B43»}, WebBookmarkUUID:“8CA5A5B8-DF35-43A4-9E68-155196F4EB4D”, URLString:“REDACTED”, WebBookmarkType:“WebBookmarkTypeLeaf”}} into type property list item.

This is my code (with the two paths at top commented or uncommented):


on processReadingListEntry(rowData, now)
	local tfile, results, pFile, children, thisDict, pListItems
	--set tfile to (path to library folder from user domain as text) & "Safari:Bookmarks.plist"
	set tfile to "/Users/ewan/Bookmarks.plist"
	set results to {}
	tell application "System Events"
		tell property list file tfile
			set children to the value of property list item "Children"
			--repeat with i in (property list items of children)
			repeat with i in children as property list item
				set title to the value of property list item "Title" of i
				if title = "com.apple.ReadingList" then
					repeat with thisDict in (get value of property list item "Children") -- get each reading list item
						set taskRecord to my createTaskRecord(rowData)
						set us to the DateAdded of ReadingList of thisDict
						-- Convert from ISO 8601 Date string to Date
						set u to (my dateFromRfc3339String:us) as date
						set URL to URLString of thisDict
						set s to the |title| of URIDictionary of thisDict
						set taskID to the WebBookmarkUUID of thisDict
						set the createdDate of taskRecord to u
						set the updatedDate of taskRecord to u
						set the taskTitle of taskRecord to s
						set the link of taskRecord to my createHyperlink(URL, s)
						copy taskRecord to end of results
					end repeat
				end if
			end repeat
		end tell
	end tell
	return results
end processReadingListEntry

Script Debugger does have full disk access in Privacy settings.

rgds
Ewan