Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
link-preview-generator
Advanced tools
Get preview data (a title, description, image, domain name) from a url. Library uses puppeteer headless browser to scrape the web site.
Get preview data (a title, description, image, domain name) from a url. Library uses puppeteer headless browser to scrape the web site.
$ npm install link-preview-generator
const linkPreviewGenerator = require("link-preview-generator");
const previewData = await linkPreviewGenerator(
"https://www.youtube.com/watch?v=8mqqY2Ji7_g"
);
console.log(previewData);
/*
{
title: 'Kiteboarding: Stylish Backroll in 4 Sessions - Ride with Blake: Vlog 20',
description: 'The backroll is a staple in your kiteboarding trick ' +
'bag. With a few small adjustments, you can really ' +
'improve your style and make this basic your own. ' +
'Sessio...',
domain: 'youtube.com',
img: 'https://i.ytimg.com/vi/8mqqY2Ji7_g/hqdefault.jpg'
}
*/
Accepts a url
, which is scraped and optional parameters puppeteerArgs
-- browser options and puppeteerAgent
-- browser user agent.
Returns an object with preview data of url
.
Type: string
Scraped url.
Type: array
Options to set on the Chrome browser.
Type: string
Specific user agent to use.
If you need to deploy this library (Puppeteer) on Heroku, follow these steps.
MIT © Andrej Gajdos
FAQs
Get preview data (a title, description, image, domain name, favicon) from a url. Library uses puppeteer headless browser to scrape the web site.
The npm package link-preview-generator receives a total of 122 weekly downloads. As such, link-preview-generator popularity was classified as not popular.
We found that link-preview-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.