Peter Hoffmann Director Data Engineering at Blue Yonder. Python Developer, Conference Speaker, Mountaineer

Atom feed for Google Reader liked items

While you can make your Google Reader starred and shared items public available, I found no way to do the same for my liked items. There isn't even a link from inside Google Reader to view your liked items.

But you can view your liked items if you open the following url And there is even an Atom feed available The problem is that you have to be logged in to view the feed. So here is a small script to do a Google ClientLogin and dump the atom feed.

import httplib2
from urllib import urlencode
client = httplib2.Http('cache')

def request_auth_token(email, passwd):
    """request auth token from google

    url = ''
    headers = {'Content-type': 'application/x-www-form-urlencoded'}
    body = urlencode({'Email': email, 'Passwd': passwd, 'service': 'reader'})
    response, content = client.request(url, 'POST', headers=headers,  body=body)
    assert response['status'] == '200'
    #if status == 403 check for Error=CaptchaRequired
    resp_data = dict(x.split('=') for x in content.split('\n') if x)
    return resp_data["Auth"]

def likes_feed(auth):
    url = ""
    headers = {'Authorization': 'GoogleLogin auth=%s' % auth}
    response, content = client.request(url, 'GET', headers=headers)
    return content

if __name__ == '__main__':
    email = ""
    passwd = "XXX"
    auth  = request_auth_token(email, passwd)
    print likes_feed(auth)

The same method should work to get the content of private folders in Google Reader.