screenshot
Type: <boolean>
Default: false
Default: false
It generates a screenshot over the target url.
- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://www.netflix.com/title/80057281', {
screenshot: true
})
mql.render(data)
When it's enabled, a new
screenshot
data field will be part of the response payload.{ "data": { "screenshot": { "url": "https://microlink-cdn.s3.amazonaws.com/s/pjzG_NocJqnd2U/Ef2b6g9P944wI_", "width": 1920, "height": 1080, "type": "jpg", "size": 284037, "size_pretty": "284 kB" } }, "status": "success" }
- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://www.netflix.com/title/80057281', {
screenshot: true,
element: '#section-hero'
})
mql.render(data)
Also, combine it with embed for inserting it as HTML markup and refresh it asynchronously in the background (known as stale).
<!-- Meta & SEO Tags --> <meta name="image" content="https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url" /> <meta itemprop="image" content="https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url" /> <meta property="og:image" content="https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url" /> <meta name="twitter:image" content="https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url" /> <!-- regular HTML Tags --> <img src="https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url" />
or inside CSS stylesheets:
.screenshot { background-image: url(https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url); }
even in Markdown:
