【文件属性】:
文件名称:rog:从传递的URL中检索打开的图形数据
文件大小:318KB
文件格式:ZIP
更新时间:2021-04-29 16:40:29
nodejs opengraph JavaScript
罗格
通过传递URL来检索打开的图形数据。
安装
安装rog及其插件。
$ npm install rog
$ npm install rog-plugin-title
用法
const { rog } = require ( 'rog' ) ;
const { rogTitle } = require ( 'rog-plugin-title' ) ;
rog ( 'http://google.com' , {
title : rogTitle
} ) . then ( data => {
console . log ( data . title ) ; // => <meta property="og:title" content="...">
} ) . catch ( error => {
console . error ( error ) ;
} ) ;
配套
:核
【文件预览】:
rog-master
----package.json(1KB)
----readme.md(2KB)
----.github()
--------workflows()
----license(1KB)
----package-lock.json(956KB)
----lerna.json(63B)
----.gitignore(75B)
----packages()
--------rog-plugin-image()
--------rog()
--------rog-plugin-images()
--------rog-plugin-url()
--------rog-plugin-description()
--------rog-plugin-title()
--------rog-plugin-type()
--------rog-plugin-sitename()
--------rog-plugin-locale()