sparklemotion / nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
https://nokogiri.org/
MIT License
6.16k stars 904 forks source link

css not returning anything, doc.validate is error... #1589

Closed miglanianurag closed 7 years ago

miglanianurag commented 7 years ago

Hello Everyone,

My name is anurag miglani, I am currently working as a data scientist, when I am trying to open a URL it is not returning anything to me.

require "nokogiri" require "open-uri"

doc = Nokogiri::HTML(open("https://boston.craigslist.org/search/bik")) puts doc.validate

Output

miglanianurag:~/workspace $ ruby test_initial.rb | head No declaration for element html No declaration for attribute class of element html No declaration for element head No declaration for element title No declaration for element meta No declaration for attribute name of element meta No declaration for attribute content of element meta is giving me an error, I am not sure what is happening. It has been doing the same on my local as well as cloud machine.

Could anyone please explain me what is happening with the library. I have searched all the internet for this problem and finally I am putting this as an issue.

Always Best, Anurag

miglanianurag commented 7 years ago

This is stupid, I am very sorry to have posted this... Please ignore this and I again apologize for the inconvenience caused. It was the error in my code. I know I should not have posted this and again I apologize for the same. Happy Scrapping.