Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
nodejs-web-scraper
Advanced tools
Nodejs-web-scraper is a simple, yet powerful and feature-rich tool, for Node programmers who want to quickly setup a complex scraping job of server-side rendered web sites.
const { Scraper, Root, DownloadContent, Inquiry, OpenLinks, CollectContent } = require('nodejs-web-scraper');
var config = {
baseSiteUrl: `https://www.nytimes.com/`,
startUrl: `https://www.nytimes.com/`,
concurrency: 10,
fileFlag: 'w',
maxRetries: 3,
cloneImages: true,
delay: 50,
filePath: './images/',
logPath: './logs/'
}
var scraper = new Scraper(config);//Create a new Scraper instance, and pass config to it.
var root = new Root();//The root object is responsible for fetching the startUrl, and starting the scraping process.
const category = new OpenLinks('.css-1wjnrbv', { name: 'category' });//Opens each category page.
const article = new OpenLinks('article a', { name: 'article' });//Opens each article page
const h1 = new CollectContent('h1', { name: 'h1' });//"Collects" the text from each H1 element.
const image = new DownloadContent('img', { name: 'image' });//Downloads every image from a given page.
root.addOperation(category);//We add child objects to their parents
category.addOperation(article);
article.addOperation(image);
article.addOperation(h1);
This basically means: "go to www.nytimes.com . Open every category. Then open every article in each category page. Then collect the h1 tags in each article, and download all images on that page".
FAQs
A web scraper for NodeJs
The npm package nodejs-web-scraper receives a total of 854 weekly downloads. As such, nodejs-web-scraper popularity was classified as not popular.
We found that nodejs-web-scraper 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.