metascraper
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -62,2 +62,2 @@ 'use strict'; | ||
exports.default = [wrap((0, _createRule.meta)('meta[property="og:site_name"]')), wrap((0, _createRule.meta)('meta[name="application-name"]')), wrap((0, _createRule.meta)('meta[property="al:android:app_name"]')), wrap((0, _createRule.meta)('meta[property="al:iphone:app_name"]')), wrap((0, _createRule.meta)('meta[property="al:ipad:app_name"]')), wrap((0, _createRule.meta)('meta[name="Publisher"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:iphone"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:ipad"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:googleplay"]'))]; | ||
exports.default = [wrap((0, _createRule.meta)('meta[property="og:site_name"]')), wrap((0, _createRule.meta)('meta[name="application-name"]')), wrap((0, _createRule.meta)('meta[property="al:android:app_name"]')), wrap((0, _createRule.meta)('meta[property="al:iphone:app_name"]')), wrap((0, _createRule.meta)('meta[property="al:ipad:app_name"]')), wrap((0, _createRule.meta)('meta[name="publisher"]')), wrap((0, _createRule.meta)('meta[name="Publisher"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:iphone"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:ipad"]')), wrap((0, _createRule.meta)('meta[name="twitter:app:name:googleplay"]'))]; |
{ | ||
"name": "metascraper", | ||
"description": "A library to easily scrape metadata from an article on the web using Open Graph metadata, regular HTML metadata, and series of fallbacks.", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": "git://github.com/ianstormtaylor/metascraper.git", | ||
"main": "./dist/index.js", | ||
"scripts": { | ||
@@ -11,2 +10,12 @@ "build": "make dist", | ||
}, | ||
"dependencies": { | ||
"date.js": "^0.3.1", | ||
"is-html": "^1.0.0", | ||
"is-isodate": "0.0.1", | ||
"is-url": "^1.2.1", | ||
"isomorphic-fetch": "^2.2.1", | ||
"jsdom": "^9.2.0", | ||
"promisify-es6": "^1.0.1", | ||
"to-title-case": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -18,15 +27,9 @@ "babel-cli": "^6.9.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babelify": "^7.3.0", | ||
"browserify": "^13.0.1", | ||
"mocha": "^2.5.2", | ||
"mocha-phantomjs": "^4.0.2", | ||
"popsicle": "^6.2.0", | ||
"source-map-support": "^0.4.0" | ||
}, | ||
"dependencies": { | ||
"date.js": "^0.3.1", | ||
"is-html": "^1.0.0", | ||
"is-isodate": "0.0.1", | ||
"is-url": "^1.2.1", | ||
"jsdom": "^9.2.0", | ||
"promisify-es6": "^1.0.1", | ||
"to-title-case": "^1.0.0" | ||
} | ||
} |
@@ -6,3 +6,5 @@ | ||
Works on the server and in the browser! | ||
## Example | ||
@@ -31,3 +33,3 @@ | ||
```js | ||
import { scrapeUrl } from 'metascraper' | ||
import { scrapeUrl } from 'metascraper/server' | ||
@@ -42,6 +44,4 @@ const metadata = await scrapeUrl('http://www.bloomberg.com/news/articles/2016-05-24/as-zenefits-stumbles-gusto-goes-head-on-by-selling-insurance') | ||
```js | ||
import { scrapeHtml } from 'metascraper' | ||
import { scrapeHtml } from 'metascraper/server' | ||
const res = fetch('http://www.bloomberg.com/news/articles/2016-05-24/as-zenefits-stumbles-gusto-goes-head-on-by-selling-insurance') | ||
const html = res.body | ||
const metadata = await scrapeHtml(html) | ||
@@ -55,3 +55,3 @@ ``` | ||
```js | ||
import { scrapeWindow } from 'metascraper' | ||
import { scrapeWindow } from 'metascraper/browser' | ||
@@ -58,0 +58,0 @@ const metadata = await scrapeWindow(window) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1034209
8
11
20
933
1
+ Addedisomorphic-fetch@^2.2.1
+ Addedencoding@0.1.13(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)