
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A simple node package scraping a web page and spitting the results in a CSV file.
A simple node package scraping a web page and spitting the results in a CSV file.
Install the module with: npm install -g scrape2csv
Scraping is pretty straightforward :
var scrape2csv = require('scrape2csv');
//let's scrape a very cool website
var url_to_scrape = "http://www.echojs.com";
var jquery_selector = "article";
//each article of the page will go through this
var handler = function($, elem, index){
var title = $(elem).find("h2 a").text();
var news_url = $(elem).find("p>a").attr("href");
//returning a new row for the csv
return [index,title,"http://www.echojs.com"+news_url];
}
//optional CSV header
var header = ["#", "Title of the article", "URL"];
scrape2csv.scrape("/tmp/echojs.csv", url_to_scrape, jquery_selector, handler, header);
Each element matching the jquery selector will call the handler provided as a parameter. The array returned by the handler will create a new csv line.
That's all folks!
Copyright (c) 2012 Fabien Allanic
Licensed under the MIT license.
FAQs
A simple node package scraping a web page and spitting the results in a CSV file.
The npm package scrape2csv receives a total of 6 weekly downloads. As such, scrape2csv popularity was classified as not popular.
We found that scrape2csv 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.