Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 735747ab20
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (32 sloc) 1.773 kb
import urllib, re, mechanize
from import BasicNewsRecipe
from calibre import __appname__
class GoogleReaderUber(BasicNewsRecipe):
title = 'Google Reader uber'
description = 'Fetches all feeds from your Google Reader account including the uncategorized items.'
needs_subscription = True
__author__ = 'davec, rollercoaster, Starson17'
base_url = ''
oldest_article = 365
max_articles_per_feed = 250
get_options = '?n=%d&xt=user/-/state/' % max_articles_per_feed
use_embedded_content = True
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
request = urllib.urlencode([('Email', self.username), ('Passwd', self.password),
('service', 'reader'), ('accountType', 'HOSTED_OR_GOOGLE'), ('source', __appname__)])
response ='', request)
auth ='Auth=(\S*)',
cookies = mechanize.CookieJar()
br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
br.addheaders = [('Authorization', 'GoogleLogin auth='+auth)]
return br
def get_feeds(self):
feeds = []
soup = self.index_to_soup('')
for id in soup.findAll(True, attrs={'name':['id']}):
url = id.contents[0].replace('broadcast','reading-list')
feeds.append(('/([^/]*)$', url).group(1),
self.base_url + urllib.quote(url.encode('utf-8')) + self.get_options))
return feeds
Jump to Line
Something went wrong with that request. Please try again.