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:
![Screenshot](https://api.microlink.io?url=https://www.netflix.com/title/80057281&screenshot=true&meta=false&embed=screenshot.url)