From fb61fb7a14da5e3bfb4844710a32214fd8a2e664 Mon Sep 17 00:00:00 2001 From: Giacomo Marangoni Date: Wed, 3 Feb 2016 00:18:23 +0100 Subject: [PATCH] Update async_mode.py The aiohttp method ClientResponse.read_and_close() is gone as of december 2015 base on documentation http://aiohttp.readthedocs.org/en/stable/changes.html --- GoogleScraper/async_mode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GoogleScraper/async_mode.py b/GoogleScraper/async_mode.py index 30c931ad..c6d53a3b 100644 --- a/GoogleScraper/async_mode.py +++ b/GoogleScraper/async_mode.py @@ -62,7 +62,8 @@ def request(): self.headers)) if response.status == 200: - body = yield from response.read_and_close(decode=False) + #The aiohttp method ClientResponse.read_and_close() is gone as of december 2015 + body = yield from response.text() self.parser = self.parser(config=self.config, html=body) return self