Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying response before parsing #37

Open
samstarling opened this issue Aug 24, 2014 · 3 comments
Open

Modifying response before parsing #37

samstarling opened this issue Aug 24, 2014 · 3 comments

Comments

@samstarling
Copy link

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

@felipecsl
Copy link
Owner

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.

@samstarling
Copy link
Author

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!

@havran
Copy link

havran commented Aug 19, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants