Last edit: @kyork in #marvin-dev 2 years ago - Slack Archive

{lua} local resp = requests.get("http://ishtar.xn--rpa.cc/bot/crime")
local t = resp:text()
local start = t:find("<h1>crime</h1>") + #"<h1>crime</h1>" + 1
local finish = t:find("</div>", start) - 1
return string.gsub(string.gsub(t:sub(start, finish), "%s*$", ""), "^%s*", "")

History

Revision: 1153 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} local resp = requests.get("http://ishtar.xn--rpa.cc/bot/crime")
local t = resp:text()
local start = t:find("<h1>crime</h1>") + #"<h1>crime</h1>" + 1
local finish = t:find("</div>", start) - 1
return string.gsub(string.gsub(t:sub(start, finish), "%s*$", ""), "^%s*", "")