Fix #4240 (Can't get goole reader recipe to work)

This commit is contained in:
Kovid Goyal 2009-12-17 10:31:29 -07:00
parent 1d0784f7c7
commit 611231ea59
2 changed files with 3 additions and 2 deletions

View File

@ -194,7 +194,8 @@ class RecursiveFetcher(object):
purl[i] = quote(purl[i]) purl[i] = quote(purl[i])
url = urlparse.urlunparse(purl) url = urlparse.urlunparse(purl)
try: 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 = response(f.read()+f.read())
data.newurl = f.geturl() data.newurl = f.geturl()
except urllib2.URLError, err: except urllib2.URLError, err: