Socket
Socket
Sign inDemoInstall

horseman-article-parser

Package Overview
Dependencies
233
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

.eslintrc.json

32

package.json
{
"name": "horseman-article-parser",
"version": "0.0.2",
"version": "0.0.3",
"description": "Web Page Inspection Tool. Sentiment Analysis, Keyword Extraction, Named Entity Recognition & Spell Check",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "./node_modules/.bin/eslint index.js --fix"
},

@@ -20,4 +20,28 @@ "repository": {

"dependencies": {
"user": "0.0.0"
"clean-html": "^1.5.0",
"compromise": "^11.12.0",
"dictionary-en-gb": "^2.0.0",
"html-to-text": "^4.0.0",
"htmldom": "^3.0.6",
"lodash": "^4.17.4",
"node-horseman": "^3.3.0",
"node-readability": "^2.2.0",
"phantomjs-prebuilt": "^2.1.14",
"retext": "^5.0.0",
"retext-keywords": "^4.0.0",
"retext-spell": "^2.3.1",
"sentiment": "^5.0.1",
"vfile-reporter-json": "^1.0.2"
},
"engines": {
"yarn": ">= 1.0.0"
},
"devDependencies": {
"eslint": "^5.6.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0"
}
}
}

@@ -1,1 +0,71 @@

# horseman-article-parser
# Horseman Article Parser
A web page article parser which returns an object containing the article's formatted text & other attributes including sentiment, keyphrases, people, places, organisations and spelling suggestions.
### Prerequisites
Node.js & NPM
### Install
```
npm install horseman-article-parser --save
```
### Usage Example
```
var parser = require('horseman-article-parser');
var params = {
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
config: { timeout: 10000, cookies: './cookies.json', bluebirdDebug: false, injectJquery: true },
url: "https://www.theguardian.com/politics/2018/sep/24/theresa-may-calls-for-immigration-based-on-skills-and-wealth"
}
parser.parseArticle(params)
.then(function (article) {
var response = {
title: article.title.text,
metadescription: article.meta.description.text,
url: article.url,
sentiment: article.sentiment,
keyphrases: article.processed.keyphrases,
people: article.people,
orgs: article.orgs,
places: article.places,
text: {
formatted: article.processed.formattedText,
html: article.processed.html
},
image: article.meta['og:image'],
screenshot: article.mobile,
spelling: article.spelling
}
console.log(response);
})
.catch(function (error) {
console.log(error.message)
console.log(error.stack);
})
```
## Development
Please feel free to fork the repo or open pull requests to the development branch. I've used [eslint](https://eslint.org/) for linting & [yarn](https://yarnpkg.com/en/) for dependency management.
Build the dependencies with:
```
yarn
```
Lint the index.js file with:
```
yarn lint
```
## License
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3 - see the [LICENSE.md](LICENSE.md) file for details
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc