local fefe = {} fefe.triggers = { "blog.fefe.de/%?ts=%w%w%w%w%w%w%w%w" } function fefe:post(id) local url = 'https://'..id local results, code = https.request(url) if code ~= 200 then return "HTTP-Fehler" end if string.match(results, "No entries found.") then return "Eintrag nicht gefunden." end local line = string.sub( results, string.find(results, "
" with newline; "" and "" with "*" local text = text:gsub("
", "\n\n"):gsub("
", "\n\n") -- format quotes and links markdown-like local text = text:gsub("
", "\n\n> "):gsub("", "\n\n") return text end function fefe:action(msg, config, matches) utilities.send_reply(msg, fefe:post(matches[1]), 'HTML') end return fefe