Commit 2a3c9b8e authored by Jean-Philippe André's avatar Jean-Philippe André

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
parent 0e17b717
...@@ -157,8 +157,13 @@ function click_chercher() ...@@ -157,8 +157,13 @@ function click_chercher()
vlc.keep_alive() vlc.keep_alive()
-- Fetch HTML data (max 65 kb) -- Fetch HTML data (max 65 kb)
local data = s:read(65535) local data = "", tmpdata
repeat
tmpdata = s:read(65535)
vlc.keep_alive() vlc.keep_alive()
if not tmpdata then break end
data = data .. tmpdata
until tmpdata == ""
-- Clean data -- Clean data
data = string.gsub(data, "<b>", "") data = string.gsub(data, "<b>", "")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment