From 2a3c9b8eaee9a7b1dd6feda20ff8133e8ca5d002 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Andr=C3=A9?= Date: Sat, 22 Jan 2011 14:13:38 +0100 Subject: [PATCH] Lua: fix Allocine for large result pages Some pages are really huge, the only way we are sure we'll be able to parse them is to download them entirely --- share/lua/extensions/allocine-fr.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/share/lua/extensions/allocine-fr.lua b/share/lua/extensions/allocine-fr.lua index 5276985a54..927f0d9c52 100644 --- a/share/lua/extensions/allocine-fr.lua +++ b/share/lua/extensions/allocine-fr.lua @@ -157,8 +157,13 @@ function click_chercher() vlc.keep_alive() -- Fetch HTML data (max 65 kb) - local data = s:read(65535) - vlc.keep_alive() + local data = "", tmpdata + repeat + tmpdata = s:read(65535) + vlc.keep_alive() + if not tmpdata then break end + data = data .. tmpdata + until tmpdata == "" -- Clean data data = string.gsub(data, "", "") -- 2.39.5