As long as we're being pedagogical, I prefer XPath to all the previous
posted solutions.
* More accommodating to minor changes in the HTML
* Very short (one-liner) and easy to read (IMHO)
require 'nokogiri'
doc = Nokogiri::HTML(html)
puts doc.xpath('//td[contains(.,"Traffic left")]/following-
sibling::td//script').to_s.scan(/Math.ceil.-(\d*)/)