htmlparser2
Advanced tools
Comparing version 3.3.0 to 3.4.0
module.exports = CollectingHandler; | ||
function CollectingHandler(cbs){ | ||
this._cbs = cbs || {}; | ||
this._cbs = cbs || {}; | ||
this.events = []; | ||
@@ -55,2 +55,2 @@ } | ||
} | ||
}; | ||
}; |
@@ -49,3 +49,3 @@ var index = require("./index.js"), | ||
addConditionally(feed, "description", "subtitle", childs); | ||
if(tmp = fetch("updated", childs)) feed.updated = new Date(tmp); | ||
if((tmp = fetch("updated", childs))) feed.updated = new Date(tmp); | ||
addConditionally(feed, "author", "email", childs, true); | ||
@@ -62,3 +62,3 @@ | ||
addConditionally(entry, "description", "summary", item); | ||
if(tmp = fetch("updated", item)) entry.pubDate = new Date(tmp); | ||
if((tmp = fetch("updated", item))) entry.pubDate = new Date(tmp); | ||
return entry; | ||
@@ -74,3 +74,3 @@ }); | ||
addConditionally(feed, "description", "description", childs); | ||
if(tmp = fetch("lastBuildDate", childs)) feed.updated = new Date(tmp); | ||
if((tmp = fetch("lastBuildDate", childs))) feed.updated = new Date(tmp); | ||
addConditionally(feed, "author", "managingEditor", childs, true); | ||
@@ -87,3 +87,3 @@ | ||
addConditionally(entry, "description", "description", item); | ||
if(tmp = fetch("pubDate", item)) entry.pubDate = new Date(tmp); | ||
if((tmp = fetch("pubDate", item))) entry.pubDate = new Date(tmp); | ||
return entry; | ||
@@ -90,0 +90,0 @@ }); |
@@ -46,4 +46,4 @@ var Parser = require("./Parser.js"), | ||
parseFeed: function(feed, options){ | ||
var handler = new module.exports.FeedHandler(); | ||
var parser = new Parser(handler); | ||
var handler = new module.exports.FeedHandler(options); | ||
var parser = new Parser(handler, options); | ||
parser.end(feed); | ||
@@ -50,0 +50,0 @@ return handler.dom; |
{ | ||
"name": "htmlparser2", | ||
"description": "Fast & forgiving HTML/XML/RSS parser", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"author": "Felix Boehm <me@feedic.com>", | ||
@@ -24,6 +24,6 @@ "keywords": ["html", "parser", "streams", "xml", "dom", "rss", "feed", "atom"], | ||
"dependencies": { | ||
"domhandler": "2.1", | ||
"domutils": "1.1", | ||
"domhandler": "2.2", | ||
"domutils": "1.3", | ||
"domelementtype": "1", | ||
"readable-stream": "1.0" | ||
"readable-stream": "1.1" | ||
}, | ||
@@ -33,6 +33,3 @@ "devDependencies": { | ||
}, | ||
"licenses": [{ | ||
"type": "MIT", | ||
"url": "http://github.com/fb55/htmlparser2/raw/master/LICENSE" | ||
}] | ||
"license": "MIT" | ||
} |
exports.name = "RDF test"; | ||
exports.file = "/RDF_Example.xml"; | ||
exports.expected = { | ||
"type": "rdf", | ||
"id": "", | ||
"title": "craigslist | all community in SF bay area", | ||
"link": "http://sfbay.craigslist.org/ccc/", | ||
"items": [ | ||
{ | ||
"title": "Music Equipment Repair and Consignment", | ||
"link": "http://sfbay.craigslist.org/sby/muc/2681301534.html", | ||
"description": "San Jose Rock Shop offers musical instrument repair and consignment! (408) 215-2065<br> <br> We are pleased to announce our NEW LOCATION: 1199 N 5th st. San Jose, ca 95112. Please call ahead, by appointment only.<br> <br> Recently featured by Metro Newspaper in their 2011 Best of the Silicon Valley edition see it online here:<br> <a href=\"http://www.metroactive.com/best-of-silicon-valley/2011/music-nightlife/editor-picks.html\" rel=\"nofollow\">http://www.metroactive.com/best-of-silicon-valley/2011/music-nightlife/editor-picks.html</a><br> <br> Guitar Set up (acoustic and electronic) $40!<!-- END CLTAGS -->" | ||
}, | ||
{ | ||
"title": "Ride Offered - Oakland/BART to LA/SFV - TODAY 3PM 11/04 (oakland north / temescal)", | ||
"link": "http://sfbay.craigslist.org/eby/rid/2685010755.html", | ||
"description": "Im offering a lift for up to two people from Oakland (or near any BART station in the East Bay/580/880 Corridor, or San Jose/Morgan Hill, Gilroy) to the San Fernando Valley / Los Angeles area. Specifically, Im leaving from Oakland between 2:30 and 3:00pm (this is flexible, but if I leave too late my girlfriend will kill me), and heading to Woodland Hills via the 580, I-5, 405, and 101.<!-- END CLTAGS -->" | ||
} | ||
] | ||
}; | ||
"type": "rdf", | ||
"id": "", | ||
"title": "craigslist | all community in SF bay area", | ||
"link": "http://sfbay.craigslist.org/ccc/", | ||
"items": [ | ||
{ | ||
"title": "Music Equipment Repair and Consignment", | ||
"link": "http://sfbay.craigslist.org/sby/muc/2681301534.html", | ||
"description": "San Jose Rock Shop offers musical instrument repair and consignment! (408) 215-2065<br> <br> We are pleased to announce our NEW LOCATION: 1199 N 5th st. San Jose, ca 95112. Please call ahead, by appointment only.<br> <br> Recently featured by Metro Newspaper in their 2011 Best of the Silicon Valley edition see it online here:<br> <a href=\"http://www.metroactive.com/best-of-silicon-valley/2011/music-nightlife/editor-picks.html\" rel=\"nofollow\">http://www.metroactive.com/best-of-silicon-valley/2011/music-nightlife/editor-picks.html</a><br> <br> Guitar Set up (acoustic and electronic) $40!<!-- END CLTAGS -->" | ||
}, | ||
{ | ||
"title": "Ride Offered - Oakland/BART to LA/SFV - TODAY 3PM 11/04 (oakland north / temescal)", | ||
"link": "http://sfbay.craigslist.org/eby/rid/2685010755.html", | ||
"description": "Im offering a lift for up to two people from Oakland (or near any BART station in the East Bay/580/880 Corridor, or San Jose/Morgan Hill, Gilroy) to the San Fernando Valley / Los Angeles area. Specifically, Im leaving from Oakland between 2:30 and 3:00pm (this is flexible, but if I leave too late my girlfriend will kill me), and heading to Woodland Hills via the 580, I-5, 405, and 101.<!-- END CLTAGS -->" | ||
} | ||
] | ||
}; |
@@ -63,3 +63,3 @@ var htmlparser2 = require(".."), | ||
function readDir(cb){ | ||
function readDir(){ | ||
var dir = path.join(root, name); | ||
@@ -82,2 +82,2 @@ | ||
} | ||
}; | ||
}; |
5846
173218
+ Addeddomhandler@2.2.1(transitive)
+ Addeddomutils@1.3.0(transitive)
+ Addedreadable-stream@1.1.14(transitive)
- Removeddomhandler@2.1.0(transitive)
- Removeddomutils@1.1.6(transitive)
- Removedreadable-stream@1.0.34(transitive)
Updateddomhandler@2.2
Updateddomutils@1.3
Updatedreadable-stream@1.1