Safari bookmarks - Windows

Joined
Oct 16, 2010
Messages
5
Reaction score
0
Points
1
Hi!

Please tell me how I can import Safari bookmarks into my program. I don't know this file format.
(Windows platform)

Thank you.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Just click on the File menu (top) when Safari is running. Click the export selection and give it a path where you want it saved. (Best to save it on your desktop.) The file will be saved as "Safari Bookmarks.html". Copy the file to a flash drive and then copy it to your Windows desktop. The html file can then be imported to Internet Explorer or Firefox for Windows.
 
OP
A
Joined
Oct 16, 2010
Messages
5
Reaction score
0
Points
1
Just click on the File menu (top) when Safari is running. Click the export selection and give it a path where you want it saved. (Best to save it on your desktop.) The file will be saved as "Safari Bookmarks.html". Copy the file to a flash drive and then copy it to your Windows desktop. The html file can then be imported to Internet Explorer or Firefox for Windows.

Thanks for you reply but I am a developer. I need to parse this file and import bookmarks into my program, not into a browsers.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Since it's an html file, you should be able to open it and parse the information you need. That's the only way to export bookmarks from Safari. (html)
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
I just tried Safari on Windows - and it put out a html file. Alt-F -> export bookmarks just as chscag said.

With 3 posts - putting a zipfile with a plist is a little shady.
 
OP
A
Joined
Oct 16, 2010
Messages
5
Reaction score
0
Points
1
I just tried Safari on Windows - and it put out a html file. Alt-F -> export bookmarks just as chscag said.

With 3 posts - putting a zipfile with a plist is a little shady.

Look at the 'Bookmarks.plist' with Notepad. It is not a HTML file.
bplist00Ф
V@XChildrenUTitle_WebBookmarkType_WebBookmarkUUID¤ ђ ћФ Ћ V Џ§ ! & XФ
YURLString]URIDictionary_http://www.apple.com/Т
PUtitleUApple_WebBookmarkTypeLeaf_$A9BBE87D-66A5-624D-B74F-87F46ED0294BФ
_http://www.yahoo.com/Т
VYahoo!_$955F1277-B439-0446-8C38-CCCFCD5D67A6Ф
_http://maps.google.com/Т
[Google Maps_$FBB8D758-D5FC-FD48-AF34-F39226B2C032Ф
_http://www.youtube.com/Т
WYouTube_$A26852CF-DE5F-0C43-BD3D-6E765FEE7404Ф
" # %_http://www.wikipedia.org/Т
" $YWikipedia_$D6665C3A-2A66-AA4A-94F2-F239482D4726Ф ' U V W© ( - 2 7 < A F K PФ
) * ,_http://www.cnn.com/Т
) +SCNN_$3722A501-F79A-5740-BD66-85E748CEA567Ф
. / 1_http://www.nytimes.
...
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
That does look like a binary plist. I don't know what to tell you but here is the (partial cut and paste) html file I get when I say export bookmarks from Safari on windows.

Code:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
        <HTML>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <Title>Bookmarks</Title>
        <H1>Bookmarks</H1>
        <DT><H3 FOLDED>Bookmarks Bar</H3>
        <DL><p>
                <DT><A HREF="http://www.apple.com/">Apple</A>
                <DT><A HREF="http://www.yahoo.com/">Yahoo!</A>
                <DT><A HREF="http://maps.google.com/">Google Maps</A>
                <DT><A HREF="http://www.youtube.com/">YouTube</A>
                <DT><A HREF="http://www.wikipedia.org/">Wikipedia</A>
                <DT><H3 FOLDED>News</H3>
                <DL><p>
                        <DT><A HREF="http://www.cnn.com/">CNN</A>
                        <DT><A HREF="http://www.nytimes.com/">The New York Times</A>
                        <DT><A HREF="feed://news.google.com/?output=rss">Google News</A>
                        <DT><A HREF="http://www.news.com/">CNET News.com</A>
                        <DT><A HREF="http://espn.go.com/">ESPN</A>
                        <DT><A HREF="http://www.latimes.com/">Los Angeles Times</A>
                        <DT><A HREF="http://news.bbc.co.uk/">BBC News</A>
                        <DT><A HREF="http://www.npr.org/">NPR</A>
                        <DT><A HREF="http://www.usatoday.com/">USA Today</A>
                </DL><p>
                <DT><H3 FOLDED>Popular</H3>
                <DL><p>
                        <DT><A HREF="http://www.ebay.com/">eBay</A>
                        <DT><A HREF="http://www.amazon.com/">Amazon</A>
                        <DT><A HREF="http://www.flickr.com/">Flickr</A>
                        <DT><A HREF="http://www.expedia.com/">Expedia Travel</A>
                        <DT><A HREF="http://www.orbitz.com/">Orbitz</A>
                        <DT><A HREF="http://www.facebook.com/">Facebook</A>
                        <DT><A HREF="http://www.monster.com/">Monster Jobs</A>
                        <DT><A HREF="http://www.careerbuilder.com/">CareerBuilder</A>
                        <DT><A HREF="http://disney.go.com/">Disney</A>
                        <DT><A HREF="http://www.craigslist.org/">craigslist</A>
                </DL><p>
        </DL><p>
        <DT><H3 FOLDED>Bookmarks Menu</H3>
        <DL><p>
        </DL><p>
 
OP
A
Joined
Oct 16, 2010
Messages
5
Reaction score
0
Points
1
If I export bookmarks using Safari browser, I will get a HTML file. It is true. But I need to work only with 'Bookmarks.plist' file without browser.
I need to get 'Bookmarks.plist' by using my program, parse this file and import bookmarks into my program to view.
If it is not corresponding forum, please tell me where I can get info about this 'Bookmarks.plist' file format?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Plist files can be xml or binary format. I would assume from what you've shown that the Windows plist for Safari bookmarks is in fact a binary one.

If you're working on a Mac, you can try converting the binary version to an xml one using plutil. Call that from your app and you should have what you need. Once you have the xml version, you should be able to easily parse it. If you're using Python, it has a plist library (see here) but it looks to only work with xml ones.

More reading on plists.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top