diff --git a/modules/canalplus/browser.py b/modules/canalplus/browser.py index fd06e89c..0ce8647c 100644 --- a/modules/canalplus/browser.py +++ b/modules/canalplus/browser.py @@ -80,7 +80,6 @@ class CanalplusBrowser(Browser): def read_url(self, url): r = requests.get(url, stream=True) buf = r.iter_lines() - r.close() return [line for line in buf if not line.startswith('#')] def iter_resources(self, split_path): diff --git a/modules/francetelevisions/browser.py b/modules/francetelevisions/browser.py index 5ef4cff7..b7a6cb60 100644 --- a/modules/francetelevisions/browser.py +++ b/modules/francetelevisions/browser.py @@ -47,7 +47,6 @@ class PluzzBrowser(PagesBrowser): def read_url(self, url): r = self.open(url, stream=True) buf = r.iter_lines() - r.close() return buf def latest_videos(self): diff --git a/weboob/applications/videoob/videoob.py b/weboob/applications/videoob/videoob.py index 5968f540..7b3e8c5b 100644 --- a/weboob/applications/videoob/videoob.py +++ b/weboob/applications/videoob/videoob.py @@ -121,10 +121,8 @@ class Videoob(ReplApplication): os.spawnlp(os.P_WAIT, args[0], *args) def read_url(self, url): - r = requests.get(url, stream=False) - buf = r.iter_lines() - r.close() - return buf + r = requests.get(url, stream=True) + return r.iter_lines() def complete_download(self, text, line, *ignored): args = line.split(' ')