Sha256: e1760ccb156b4d4db7a73ff0eeb83beab4f7ecfede4e793a303138b3d11ca740
Contents?: true
Size: 577 Bytes
Versions: 113
Compression:
Stored size: 577 Bytes
Contents
require 'open-uri' html = URI('http://www.au.kddi.com/ezfactory/tec/spec/4_4.html').read array = html.scan %r{<td bgcolor="#f2f2f2"><div class="TableText">(.+?)</div></td>.*?<td><div class="TableText">(.+?)</div></td>}m gps_unsupported = [] array.each do |pair| pair.map! {|x| x.gsub(/<br>| /,"")} next if pair.first.empty? || pair.last.empty? name = pair.first devids = pair.last.split(/\//) case name when /^T[DKSTP]/, /^[AC]1\d\d\d/, /^C\d\d\d[^\d]/, "B01K" gps_unsupported |= devids else gps_supported |= devids end end p gps_unsupported
Version data entries
113 entries across 102 versions & 1 rubygems