Add the possibility to fetch input from a string rather than a webpage
-
Peter Szinek
- State changed from new to open
-
Peter Szinek
- Milestone set to 0.4.1
-
Peter Szinek
- State changed from open to resolved
I think this is what you wanted:
require 'rubygems' require 'scrubyt' garbage = <<-SZ <html> <body> <table> <tr><td>1</td></tr> <tr><td color="red">2</td></tr> <tr><td>3</td></tr> </table> </body> </html> SZ google_data = Scrubyt::Extractor.define do fetch nil, :html => garbage redcell "//td[@color='red']" end puts google_data.to_xmloutputs
2
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.