Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pagedownloader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagedownloader - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

8

package.json
{
"name": "pagedownloader",
"description": "Node module to download a complete html webpage",
"version": "0.0.1",
"version": "0.0.2",
"author": {

@@ -17,2 +17,8 @@ "name": "Sam Decrock",

"main": "./pagedownloader",
"contributors": [
{
"name": "hhuang",
"url": "https://github.com/hhuang"
}
],
"licenses": [

@@ -19,0 +25,0 @@ {

11

pagedownloader.js

@@ -109,8 +109,13 @@ /*

// get all tags with a css file
var tags2 = o.content.match(/<.+?href=[\"'].+?\.css[\"'].+?>/g);
tags = tags.concat(tags2);
// console.log("tags", tags);
if(!tags || !tags.length) return this(); // there are no tags: go to the next Step function
async.forEach(tags, function (tag, eachDone){
// get the content from src="":
var src = tag.match(/src=[\"'](.+?)[\"']/)[1];
// get the content from src=""/href="":
var src = tag.match(/src=[\"'](.+?)[\"']/) ? tag.match(/src=[\"'](.+?)[\"']/)[1] : tag.match(/href=[\"'](.+?\.css)[\"']/)[1];
// get the absolute url

@@ -117,0 +122,0 @@ var absoluteUrl = url.resolve(o.baseurl, src);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc