icps

notes

Nokogiri

install

apt-get install libxslt-dev libxml2-dev

s

1
2
3
4
5
# split br
a.search('br').each do |n|
    n.replace("\n")
end
a.text.split("\n")
1
2
3
4
# &nbsp remove
#gsub("\u00A0", "")

doc.xpath(".//p/text()").map(&:content).select{|i|not i == "\u00A0"}