Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-page-info

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-page-info

get web page info

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source



get-page-info

Quickly get the main information from the URL.

npm

Install

$ npm i get-page-info --save

Usage

import { getPageInfo, IPageInfoOptions } from 'get-page-info';
const info = await getPageInfo('https://www.baidu.com/', {} as IPageInfoOptions);
console.log(info);
/*
{
  "title": "百度一下,你就知道",
  "desc": "全球领先的中文搜索引擎、致力于让网民更便捷地获取信息,找到所求。百度超过千亿的中文网页数据库,可以瞬间找到相关的搜索结果。",
  "url": "https://www.baidu.com/",
  "favicon": "https://www.baidu.com/favicon.ico",
  "author": {},
  "main": {
    "content": "关于百度\nAbout Baidu\n使用百度前必读\n帮助中心\n企业推广\n京公网安备11000002000001号\n京ICP证030173号\n互联网新闻信息服务许可证11220180008\n网络文化经营许可证: 京网文〔2023〕1034-029号\n信息网络传播视听节目许可证 0110516\n互联网宗教信息服务许可证编号:京(2022)0000043\n药品医疗器械网络信息服务备案(京)网药械信息备字(2021)第00159号\n医疗器械网络交易服务第三方平台备案凭证(京)网械平台备字(2020)第00002号\n©2024 Baidu "
  }
}
*/

options: IPageInfoOptions

export interface IPageInfoOptions {
  // When set to false, author information is not parsed
  author?: boolean;
  // When set to false, content is not parsed
  content?: boolean;
}

License

MIT

FAQs

Package last updated on 24 Feb 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc