ruby - Net:Http only want part of the response -


so using this:

net::http.get(uri.parse(url)) 

works perfect.

issue having page gets formatted head, html, body, etc tags. there label element in body id of "result" want me text of "result". not html formatting.

can done?

well, part of content in html have use html parser, nokogiri in case .

doc = nokogiri::html(open(url)) doc.css('#result').each |re|   puts re.to_s   #puts re.content end 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -