Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
#article
Analyze a stream of HTML and outputs the article title, text, and image
Usually you have some feed, there will give you the title and perhaps a short description of the article. However its rare that it contains the image and certainly never the full context. This module will scrape the raw article html of the page and find as minimum the
title
,text
and theimage
.
npm install article
var source = 'http://en.wikipedia.org/wiki/Fish';
// The image url will be resolved from the `source` url
request(source).pipe(article(source, function (err, result) {
if (err) throw err;
// result = {
// title: String,
// text: String,
// image: String or null
// };
}));
For a demo you can run the analyse server I use for reliability scoring:
git clone https://github.com/AndreasMadsen/article.git
cd article
npm install
node tools/analyse/
open http://localhost:9100
This is the current result (Mon Jul 29 2013).
Note this data is the same data I've used to build the heuristic algorithm. So there is a risk that the algorithm is overfitted.
Unknown | Wrong | Bad | Good | Perfect | |
---|---|---|---|---|---|
Title | 0 | 0 | 0 | 0 | 258 |
Text | 0 | 0 | 0 | 138 | 120 |
Image | 0 | 29 | 0 | 62 | 167 |
The title can either be wrong or perfect. Perfetct means that it is the actual article title without any newspaper name or similar redundant information.
The text can be wrong, bad, good and perfect. Wrong means that none of the text is related to the article. Bad means that there are enogth noise to give seriouse troubble in a text analysis. Good is almost perfect expect for minor noise such as author information or social network button text.
Image can be wrong, good and perfect. Wrong is an image there is unrealted to the article or if no image could be found. Good is either not the main article or a lower resolution image than the expected perfect image.
##License
The software is license under "MIT"
Copyright (c) 2013 Andreas Madsen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Analyze a stream of HTML and outsputs the article title, text, and image
The npm package article receives a total of 150 weekly downloads. As such, article popularity was classified as not popular.
We found that article 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.