diff options
-rw-r--r-- | weblog-model.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/weblog-model.lua b/weblog-model.lua index eca067a..3b3cc40 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -638,9 +638,18 @@ local getlogcandidates = function(source, cookiesfile) local candidates = {} if source.method == "http" or source.method == "https" then local resultpage = modelfunctions.run_executable({"wget", "-O", "-", "--no-check-certificate", "--load-cookies", cookiesfile, source.method.."://"..source.source.."/cgi-bin/acf/alpine-baselayout/logfiles/status"}) + -- This method works for view prior to acf-alpine-baselayout-0.12.0 for file in string.gmatch(resultpage, "download%?[^\"]*name=([^\"]+)") do candidates[#candidates+1] = file end + -- This method works for view from acf-alpine-baselayout-0.12.0 + local reversetable = {} + for file in string.gmatch(resultpage, 'name="filename" value="([^\"]+)"') do + if not reversetable[file] then + candidates[#candidates+1] = file + reversetable[file] = true + end + end elseif source.method == "local" then candidates = fs.find_files_as_array(nil, source.source) end |