From 85e46ead6092e5148058db2ecdedecc460ba94ee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Jun 2013 21:22:28 +0530 Subject: [PATCH] Remove the Google Reader recipes as it is shutting down --- recipes/greader.recipe | 35 ----------------------------------- recipes/greader_uber.recipe | 35 ----------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 recipes/greader.recipe delete mode 100644 recipes/greader_uber.recipe diff --git a/recipes/greader.recipe b/recipes/greader.recipe deleted file mode 100644 index 2c9d5aa015..0000000000 --- a/recipes/greader.recipe +++ /dev/null @@ -1,35 +0,0 @@ -import urllib, re, mechanize -from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre import __appname__ - -class GoogleReader(BasicNewsRecipe): - title = 'Google Reader' - description = 'This recipe fetches from your Google Reader account unread Starred items and unread Feeds you have placed in a folder via the manage subscriptions feature.' - needs_subscription = True - __author__ = 'davec, rollercoaster, Starson17' - base_url = 'http://www.google.com/reader/atom/' - oldest_article = 365 - max_articles_per_feed = 250 - get_options = '?n=%d&xt=user/-/state/com.google/read' % 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 = br.open('https://www.google.com/accounts/ClientLogin', request) - auth = re.search('Auth=(\S*)', response.read()).group(1) - 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('http://www.google.com/reader/api/0/tag/list') - for id in soup.findAll(True, attrs={'name':['id']}): - url = id.contents[0] - feeds.append((re.search('/([^/]*)$', url).group(1), - self.base_url + urllib.quote(url.encode('utf-8')) + self.get_options)) - return feeds diff --git a/recipes/greader_uber.recipe b/recipes/greader_uber.recipe deleted file mode 100644 index 5e02cdef5d..0000000000 --- a/recipes/greader_uber.recipe +++ /dev/null @@ -1,35 +0,0 @@ -import urllib, re, mechanize -from calibre.web.feeds.recipes 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 = 'http://www.google.com/reader/atom/' - oldest_article = 365 - max_articles_per_feed = 250 - get_options = '?n=%d&xt=user/-/state/com.google/read' % 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 = br.open('https://www.google.com/accounts/ClientLogin', request) - auth = re.search('Auth=(\S*)', response.read()).group(1) - 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('http://www.google.com/reader/api/0/tag/list') - for id in soup.findAll(True, attrs={'name':['id']}): - url = id.contents[0].replace('broadcast','reading-list') - feeds.append((re.search('/([^/]*)$', url).group(1), - self.base_url + urllib.quote(url.encode('utf-8')) + self.get_options)) - return feeds