I can get the description inside the command prompt.
What I did?
Create a Example.rb file on my PC. Entered the below code inside the file and saved it.
require 'nokogiri'
require 'open-uri'
url = "C:/Users/Manikandan/websites/index.html"
data = Nokogiri::HTML(open(url))
puts data.at_css("#summaryDescription").text.strip
puts data.css(".postContent").text.strip
data.at_css('h1.title').text.strip
When running the file on Command prompt, I can get the details
But I get all the answers as a single paragraph. I'm not sure what I'm doing, please help me.