felipecsl/wombat

Modifying response before parsing

Opened this issue · 3 comments

Hello,

Is it at all possible to modify the HTML before it's attempted to be parsed by Mechanize or Nokogiri? As an example, there's a page I want to parse which is incorrectly closing an HTML comment with --!> (rather than -->).

Is there any way of doing this already? If not, I'll add it and submit a pull request.

Thanks,
Sam

hey @samstarling, nope, unfortunately it's not possible. Please feel free to submit a PR with this change. I think it would be useful if we could optionally take a string to be used instead of the base_url + path, so you could fetch it manually first, fix the issus and then send to wombat.

Hi @felipecsl - thanks for the quick response! That sounds like a sensible idea. If I get a chance in the next few days, then I'll try and get that implemented!

Hi, any news about this issue? This feature would be useful. Thanks.