pagedownloader
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"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 @@ { |
@@ -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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7943
151