Skip to content

Commit fd07c19

Browse files
committed
Disable streaming parsing as the request lib no longer supports onResponse
1 parent fb34d9d commit fd07c19

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

HISTORY.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
### v0.4.9
2+
* Disabled streaming parsing as mikeal/request no longer supports options.onResponse
3+
14
### v0.4.8
25
* Fix the pagerank builtin
6+
* Fix for nested parseHtml calls
37

48
### v0.4.7
59
* Break out of .each early with return false

lib/node.io/dom.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ Job.prototype.parseHtml = function (data, callback, response) {
8989
//Check if the parser is already initalised
9090
if (!this.htmlparser) {
9191
this.prepareHtmlparser();
92-
this.htmlparser.parseComplete(data);
93-
} else {
94-
this.htmlparser.done();
9592
}
93+
this.htmlparser.parseComplete(data);
9694
}
9795
};
9896

lib/node.io/request.js

-13
Original file line numberDiff line numberDiff line change
@@ -289,19 +289,6 @@ Job.prototype.doRequest = function (method, resource, body, headers, callback, p
289289
options.timeout = this.options.timeout * 1000;
290290
}
291291

292-
//We can parse chunks as they are received if using soupselect/htmlparser
293-
if (this.htmlparser) {
294-
options.onResponse = function (err, response) {
295-
if (!err) {
296-
response.on('data', function (chunk) {
297-
if (self.htmlparser) {
298-
self.htmlparser.parseChunk(chunk);
299-
}
300-
});
301-
}
302-
}
303-
}
304-
305292
request(options, function (err, response, body) {
306293
if (self.is_complete) {
307294
return;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ "name" : "node.io",
22
"description" : "A distributed data scraping and processing framework",
3-
"version" : "0.4.8-3",
3+
"version" : "0.4.9",
44
"homepage" : "http://github.com/chriso/node.io",
55
"keywords" : ["data","mapreduce","map","reduce","scraping","html","parsing","parse","scrape","process","processing","data"],
66
"author" : "Chris O'Hara <cohara87@gmail.com>",

0 commit comments

Comments
 (0)