GData python client accesing google notebook


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/python
  2.  
  3. import gdata.service
  4.  
  5. #Get the generic GData service
  6. gservice = gdata.service.GDataService()
  7.  
  8. #Set the server we are going to work with
  9. gservice.server = "www.google.com"
  10.  
  11. #User id for google notebook to use: 09641038559637245294
  12. #(see google notebook sharing options to optains yours)
  13. #Get the feed for shared notebooks
  14. feed = gservice.GetFeed("/notebook/feeds/09641038559637245294")
  15. #This call is the same that doing this:
  16. # curl http://www.google.com/notebook/feeds/09641038559637245294
  17.  
  18. #For each notebook in feeds use gdata api to extract info
  19. for notebook_entry in feed.entry:
  20. print "Notebookt: %s" % notebook_entry.title.text
  21. print "URI: %s" % notebook_entry.GetSelfLink().href

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.