Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
muninn
Advanced tools
Readme
Muninn is a fast and flexible HTML parsing tool that simplifies the process of extracting data from HTMLs. It allows you to create a configuration file, making it easy to keep parser settings up to date even when selectors change. With its easy-to-learn syntax and the power of the cheerio library for parsing, Muninn is a versatile solution for various parsing needs.
import { parse } from 'muninn';
const config = {
schema: {
title: '#productTitle',
price: '#priceblock_ourprice',
rating: {
selector: '#acrPopover span | float',
regex: /\d+\.?\d?/
},
features: {
selector: '#productOverview_feature_div tr.a-spacing-small | array',
schema: {
name: 'td:nth-child(1)',
value: 'td:nth-child(2)'
}
}
}
};
// The `data` is an HTML Content of type string.
// https://www.amazon.com/AMD-Ryzen-3700X-16-Thread-Processor/dp/B07SXMZLPK/
const data = '<html>...</html>';
const result = parse(data, config);
{
"title": "AMD Ryzen 7 3700X 8-Core, 16-Thread Unlocked Desktop Processor with Wraith Prism LED Cooler",
"price": "$308.99",
"rating": 4.9,
"features": [
{
"name": "Brand",
"value": "AMD"
},
{
"name": "CPU Model",
"value": "AMD Ryzen 7"
},
{
"name": "CPU Speed",
"value": "4.4 GHz"
},
{
"name": "CPU Socket",
"value": "Socket AM4"
},
{
"name": "Processor Count",
"value": "8"
}
]
}
Distributed under the MIT License. See LICENSE for more information.
FAQs
It parses the html and collects the requested data as desired.
The npm package muninn receives a total of 87 weekly downloads. As such, muninn popularity was classified as not popular.
We found that muninn demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.