3 ms·
Wait, what's the difference between this and using a Ruby/Python/etc REPL? In other words, normally to achieve this same result I would do: irb -> require 'Nok
by mbesto 12y ago
Wait, what's the difference between this and using a Ruby/Python/etc REPL? In other words, normally to achieve this same result I would do:
irb -> require 'Nokogiri' and require 'open-uri' -> doc = Nokogiri::HTML(open('http://www.google.com/') http://www.google.com/'))
and no need to store the HTML via wget on my machine. Am I missing something?
- aw3c2 12y agoYou can use this with pipes and redirectors in the command line.
- dashesyan 12y agoNokogiri comes with a command-line tool for just that purpose: https://github.com/sparklemotion/nokogiri/blob/master/bin/nokogiri https://github.com/sparklemotion/nokogiri/blob/master/bin/no... Example: nokogiri https://news.ycombinator.com https://news.ycombinator.com -e 'puts $_.css("td.title a @href")'
- mateuszf 12y agoThe difference is that you don't have to know python/ruby, remember specific package names and to install them before using.