node-scrapy
Advanced tools
Comparing version
11
index.js
@@ -294,5 +294,10 @@ /** | ||
get = (item.get === 'text') | ||
? function(node) { return transform.apply(item.prefix + trim.apply(node.text()) + item.suffix); } | ||
: function(node) { return transform.apply(item.prefix + trim.apply(node.attr(item.get)) + item.suffix); }; | ||
get = (function(i){ | ||
if (i.get === 'text') | ||
return function(node) { return transform.apply(item.prefix + trim.apply(node.text()) + item.suffix); }; | ||
else if (i.get === 'html') | ||
return function(node) { return transform.apply(item.prefix + trim.apply(node.html()) + item.suffix); }; | ||
else | ||
return function(node) { return transform.apply(item.prefix + trim.apply(node.attr(item.get)) + item.suffix); }; | ||
})(item); | ||
@@ -299,0 +304,0 @@ /** |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Stefan Maric <me@stefanmaric.com>", | ||
@@ -16,0 +16,0 @@ "repository": "eeshi/node-scrapy", |
@@ -166,2 +166,4 @@ node-scrapy | ||
`'html'`: gets the content including html tags. The equivalent of [`Element.innerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML). | ||
`'{attribute}'`: gets the value of the given `attribute`. e.g. `'src'`, '`href`', `'disabled'`, etc. | ||
@@ -168,0 +170,0 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
70616
0.17%276
0.73%1
-50%7
-12.5%1797
-0.11%