Use Xpath instead of CSS on Nokogiri. It can increase performance.