Import your del.icio.us bookmarks into Google #
Update on 12/18/2010: I've updated the tool to handle the V2 Delicious API.
I've written a simple script/site that lets you import your del.icio.us bookmarks into Google's bookmarks feature (which doesn't seem to have a product name - oh, right):
http://persistent.info/delicious2google/
Technical Details
For a while now, Kushal* had been wanting a way to import his del.icio.us bookmarks into Google. There are some advantages to this, including the fact that your tags labels show up in search results if they contained a bookmarked site and one-click Toolbar access. It was pointed out to me that the bookmarks site has a POST/XML-based bulk import interface that the Google Toolbar uses to import IE Favorites. I initially thought that I could use del.icio.us's JSON API to get the list of bookmarks, thus having a completely client-side solution that did not require the user to hand over his/her credentials. Unfortunately that turned out to be limited to 100 posts. Hack-ish workarounds came to mind, like getting the list of tags first and then getting the bookmarks for a particular tag (still wouldn't work if there were more than 100 bookmarks for a single tag). I abandoned that approach, but for the sake of posterity, that version is archived here.
Since del.icio.us also has a REST API that allows full access to data, my next thought was to use that. pydelicious is a pretty simple to use Python library for accessing the API, and it was easy to create a script that used it to fetch the list of bookmarks for a user. Since I already had the code from my previous attempt that took the JSON output and uploaded it, I merely made the Python code output similar JSON and used the same upload method.
This approach seems to work pretty well, but it has the caveat that the user has to enter their username and password into a third-party site. I've provided the source code so that the paranoid can run their own copy. While the Google bookmarks site doesn't have an API per se, it does export its data as RSS feeds thus this does not have to be a one-way transfer; an enterprising hacker could write an importer in the other direction.
* His newly-released luxur(n)y site is interesting if you're in the market for a NYC luxury rental.
84 Comments
If only Google Bookmarks were sharable...
Nice script!! Though I have 630 items in delicious and only about 70 were imported ... any idea what to do?
thanks!
Jonathan
I've been using Reader regularily since it started, and I use stars for quick scanning (a "to read" list to return to when I don't have time to do it). However, I also keep my interesting links there, for tranferring to del.icio.us. If I was using Bookmarks and the feed items had an easy link to add to it, life would be great.
Btw, I threw this into an almost one-step bookmarklet that keeps bookmark and login data client-side. With it, one need only visit delicious' export page and click the bookmarklet to sync everything.
http://blog.lifeslip.com/articles/2006/10/25/bookmarklet-delicious-google-bookmarks
I don't know enough about Python scripting to edit your script and run it myself, but I played around a bit with the del.icio.us and Google Bookmarks APIs in order to figure out how they work.
If you map the contents of the attribute "description" as output from the del.icio.us REST API into the Google Bookmarks attribute "annotation," the notes should be transferred. ("&annotation=" is the string that will add notes when part of a bookmarklet; I'm using "&annotation='+getSelection()" to set the notes field to the current selection in the bookmarklet I'm currently working on).
"http://www.google.com/bookmarks/mark?op=upload_selection&hl=en&zx="
The body of the post begins with:
q=&s==Import
and then you follow this by any number of bookmark data streams, like this one:
&bm_1=X&url_1=&ttl_1=&lbl_1=
The next one is bm_2, url_2, ttl_2, lbl_2, etc.
This all seems to work fine, except that I cannot figure out the tag used to import the fourth and final field, the "Notes" or "Annotation" for each bookmark. You don't have that in your code. I've tried ano_1, ann_1, not_1, etc. No luck!
In the RSS feed of bookmarks that comes back from Google, I see that they use the longer name "annotation", along with the "label" and "title", but I tried "annotation", "note" and "annotations" in your "abandoned" code but these don't work either.
Do you know what tag might be used for "notes" or "annotations"??
By the way, parsing the RSS to read the bookmarks is easy, like you said. I've also figured out how to delete bookmarks. So this is the last lilttle piece I need to have a complete Google Bookmarks importer/exporter!
Jerry Krinock
San Jose, CA USA
q=&s=signatureFromRSSHeaderItems=Import
&bm_1=X&url_1=urlOfBookmark1&ttl_1=titleOfBookmark1&lbl_1=commaSeparatedLabelsOfBookmark1
Jerry
http://www.google.com/bookmarks/lookup?start=15&output=rss
encoding="utf-8"
but the accented "e" (as in "San Jose") comes to you as a single byte, 0xE9. That aint' UTF-8!!! So, I have to hack into it and replace that with
encoding="windows-1252"
and now my XML parser is much happier.
Since Google Bookmarks is not a public API, there is no place to discuss it on Google; this seems to be the only place where people are interested!
This is about the third time I am trying to upload my delicious to Google Bookmarks. But it just displays the "Uploading" page (after I give the delicious userid and pwd) and nothing much seems to happen after that.
My Google Bookmark count still remains at 4 (those 4 are the manually added ones).
Any idea what could be the reason?
I have close to 1000 items in delicious. Also, it would be very helpful if it can display some status message like "uploading 1 of 1000" etc. At least, the people who are uploading would know what is happening.
Thanks so much for the great blog and all the great greasemonkey scripts that you have written over the last few years.
Regards,
Proto, India.
It's a command-line Python program which can be run from your desktop. You can grab it here - http://code.google.com/p/gbookmark2delicious/
Tried both Firefox and IE.
hope it coгдв be fixed.
Alex
I'm not complaining -- this is free code, after all, and I'm not jumping up to debug it. But FYI.
If it would be possible to have Google reader be able to interact with your favorites so you would have the easy option of adding the feeds from one section to the other. (^_^)
del.icio.us lets you share your Bookmarks but doesn't have the capability that Google Notebooks integration with Google Bookmarks offer.
With Firefox 3 supporting tags it will be really useful.
I am currently looking for ways to at least synchronize the Bookmarks including the associated tags between Google Bookmarks and del.icio.us
I have both the del.icio.us adon and all the Google adons for Firefox (Google Browser Sync, Google Notebook Ad-on, Google Toolbar which includes Bookmarks but can't find a way to synchronize the Bookmarks.)
The reason I am looking at it is that I realized just now that all your Google Bookmarks are already accessible from your Google Notebook. It would be amazing to have notes for everything you find on the Web..
Your script helped a lot..
You may consider an ad-on for Firefox3 as they are implementing tags so I guess a lot of interoperability issue will be resolved.
Thanks for the Script...
And the best part was that you managed to get this done without taking the Google Account info.
In the first page where the Script asks for your del.icio.us login info I was a little worried thinking that I might need to provide my Google Account information but then the Transparency that you demonstrated by providing the full source code of what will get executed in teh Server did give me a lot of confidence in your Script.
Also needless to mention no redundancy of bookmarks a s it filters already existing bookmarks, with the option to choose which bookmarks you want to import
Thanks man..
Also the fact that Google allows you to have multi word tags whereas del.icio.us doesn't is again an interoperability issue.
Bye the Way I read the last para of the post after importing my bookmarks and posting my last comment. SO you can probably understand my concerns on the Login info issue. :)
Thanks!
Does this interfere with your app? I am asking because I am one of those who already integrated his Delicious profile with Yahoo, and I tried your app but it didn't work. Error message was: "Error talking to del.icio.us
".
Any ideas why this isn't working?
Thanks for putting this together -- even though it's not grabbing everything, it's a lot better than having to move these bookmarks by hand!
http://developer.yahoo.net/forum/?showtopic=3065
But there may be another problem caused by a change during the past week at Google. The python script which runs on Mihai's server, http://persistent.info/delicious2google/import.py.txt, contains an HTTP Post submission to http://www.google.com/bookmarks/mark. Try changing the scheme in there from http to https. That fixed the problem in my apps Bookdog and BookMacster. I'd be interested to know if someone can confirm this.
what would you think about a service like this?:
http://www.favoritious.com
I wonder what the deal is? Why wouldn't Google have actually made a tool for this?
I see other people having the same problem. Anyone know of a solution?
Thanks.
Uploading...
and then
Error talking to del.icio.us
The source code of the pages does not give much more info:
[the blog does not accept the code, but it said almost nothing]
How can I help debug this?
I tried both firefox 3.6 and chrome 4.1
Import worked great after I renamed a problematic title:
,"d":'Open Source Web Design - Design or Not? /\^/\'
i removed the /\^/\ as it gave me a javascript error (unterminated string literal)
"Error talking to del.icio.us"
Is there something to fix? I only have 400+ bookmarks and it doesn't work. Very sad.
"Uploading...."
and
"Error talking delicious "
without any result at all
"Uploading..." error is there due to a very lengthy description in any of your bookmark in delicious, or it could be any non standard script.
You must identify that bookmark that is causing error, to do so i used 'firebug' extension for firefox.
I used it on del2google page, it showed the error in one line that a string is not properly terminated in 'e' line, (developer can solve this problem). I searched that bookmark in delicious and deleted and problem solved :)
i have tried to fix bookmark descriptions in delicious but no success! :-(((
is there anything i can do?
reg,
kasi
"Uploading...
Error talking to del.icio.us "
halp! :/
"Uploading...
Error talking to del.icio.us "
halp! :/
Really??
delicious is closing Down??
SAD!! It had been a Good companion in my journey on the Web..
@rungss on Twitter
Give it a whirl... http://andyhitchman.github.com/DeliciousToGoogleBookmarks/
Error talking to del.icio.us
Can u fix this?
Awesome ! It works ! Any way to add an enhancement to import the "notes" from delicious too? Thanks though, everything else worked flawless.
I am using google chrome version : 14.0.835.186 m
I also tested this out with Firefox 6.0.2 and getting the same results were the JSON data of the application is directly shown on the webpage.
Post a Comment