$ luarocks install makeshot.ai luarocks install makeshot
local makeshot = require("makeshot")
local screenshot_data, err = makeshot.capture_page {
url = "https://makeshot.ai/",
full_page = true
}
if err then
print("Error capturing screenshot: " .. err)
else
-- Save the screenshot data to a file (e.g., screenshot.png)
local file = io.open("screenshot.png", "wb")
file:write(screenshot_data)
file:close()
print("Screenshot saved to screenshot.png")
end
Versions
Dependencies
lua >= 5.1