Skip to content


Ensure we reset the parser each time #67

merged 1 commit into from

2 participants


I'm not sure this is the best way to handle it, but this fixes #66


Not sure what's going on here, I'll have to have a look at the htmlparser code to see why the callback gets called multiple time. I'll merge this for now until I can figure out what's going on. Thanks

@chriso chriso merged commit 3894bb8 into chriso:master

Yeah, you can't parse multiple times using a handler without a reset in between:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 12, 2011
  1. @mhart
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/
1 lib/
@@ -106,6 +106,7 @@ Job.prototype.prepareHtmlparser = function () {
var self = this, $, htmlparser = require('htmlparser');
this.postParse = function () {};
this.htmlparser = new htmlparser.Parser(new htmlparser.DefaultHandler(function () {
+ self.htmlparser = null;
self.postParse.apply(this, arguments);
}, {verbose: true, ignoreWhitespace: true}
Something went wrong with that request. Please try again.