From 611231ea59272ffb671a324fe20df574dbc5eebd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Dec 2009 10:31:29 -0700 Subject: [PATCH] Fix #4240 (Can't get goole reader recipe to work) --- resources/recipes/greader.recipe | 2 +- src/calibre/web/fetch/simple.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/recipes/greader.recipe b/resources/recipes/greader.recipe index 31b4ec8b7e..cbf4c0226b 100644 --- a/resources/recipes/greader.recipe +++ b/resources/recipes/greader.recipe @@ -32,6 +32,6 @@ class GoogleReader(BasicNewsRecipe): 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), + feeds.append((re.search('/([^/]*)$', url).group(1), self.base_url + urllib.quote(url.encode('utf-8')) + self.get_options)) return feeds diff --git a/src/calibre/web/fetch/simple.py b/src/calibre/web/fetch/simple.py index 4957e81b14..4936feb77f 100644 --- a/src/calibre/web/fetch/simple.py +++ b/src/calibre/web/fetch/simple.py @@ -194,7 +194,8 @@ class RecursiveFetcher(object): purl[i] = quote(purl[i]) url = urlparse.urlunparse(purl) try: - with closing(self.browser.open_novisit(url, timeout=self.timeout)) as f: + open_func = getattr(self.browser, 'open_novisit', self.browser.open) + with closing(open_func(url, timeout=self.timeout)) as f: data = response(f.read()+f.read()) data.newurl = f.geturl() except urllib2.URLError, err: