Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disable streaming parsing as the request lib no longer supports onRes…

…ponse
  • Loading branch information...
commit fd07c193919cd6939d38f457342b5aeaeb4cf9fe 1 parent fb34d9d
@chriso authored
View
4 HISTORY.md
@@ -1,5 +1,9 @@
+### v0.4.9
+ * Disabled streaming parsing as mikeal/request no longer supports options.onResponse
+
### v0.4.8
* Fix the pagerank builtin
+ * Fix for nested parseHtml calls
### v0.4.7
* Break out of .each early with return false
View
4 lib/node.io/dom.js
@@ -89,10 +89,8 @@ Job.prototype.parseHtml = function (data, callback, response) {
//Check if the parser is already initalised
if (!this.htmlparser) {
this.prepareHtmlparser();
- this.htmlparser.parseComplete(data);
- } else {
- this.htmlparser.done();
}
+ this.htmlparser.parseComplete(data);
}
};
View
13 lib/node.io/request.js
@@ -289,19 +289,6 @@ Job.prototype.doRequest = function (method, resource, body, headers, callback, p
options.timeout = this.options.timeout * 1000;
}
- //We can parse chunks as they are received if using soupselect/htmlparser
- if (this.htmlparser) {
- options.onResponse = function (err, response) {
- if (!err) {
- response.on('data', function (chunk) {
- if (self.htmlparser) {
- self.htmlparser.parseChunk(chunk);
- }
- });
- }
- }
- }
-
request(options, function (err, response, body) {
if (self.is_complete) {
return;
View
2  package.json
@@ -1,6 +1,6 @@
{ "name" : "node.io",
"description" : "A distributed data scraping and processing framework",
- "version" : "0.4.8-3",
+ "version" : "0.4.9",
"homepage" : "http://github.com/chriso/node.io",
"keywords" : ["data","mapreduce","map","reduce","scraping","html","parsing","parse","scrape","process","processing","data"],
"author" : "Chris O'Hara <cohara87@gmail.com>",
Please sign in to comment.
Something went wrong with that request. Please try again.