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>|&nbsp;/,"")}
  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

Version Path
jpmobile-8.0.0 tools/list_gps_unsupported_au.rb
jpmobile-7.2.0 tools/list_gps_unsupported_au.rb
jpmobile-7.1.0 tools/list_gps_unsupported_au.rb
jpmobile-7.0.4 tools/list_gps_unsupported_au.rb
jpmobile-7.0.3 tools/list_gps_unsupported_au.rb
jpmobile-7.0.2 tools/list_gps_unsupported_au.rb
jpmobile-7.0.1 tools/list_gps_unsupported_au.rb
jpmobile-7.0.0 tools/list_gps_unsupported_au.rb
jpmobile-6.1.2 tools/list_gps_unsupported_au.rb
jpmobile-6.1.1 tools/list_gps_unsupported_au.rb
jpmobile-6.1.0 tools/list_gps_unsupported_au.rb
jpmobile-6.0.0 tools/list_gps_unsupported_au.rb
jpmobile-5.2.5 tools/list_gps_unsupported_au.rb
jpmobile-6.0.0.beta tools/list_gps_unsupported_au.rb
jpmobile-5.2.4 tools/list_gps_unsupported_au.rb
jpmobile-4.2.5 tools/list_gps_unsupported_au.rb
jpmobile-4.2.4 tools/list_gps_unsupported_au.rb
jpmobile-5.0.1 tools/list_gps_unsupported_au.rb
jpmobile-5.1.1 tools/list_gps_unsupported_au.rb
jpmobile-5.2.3 tools/list_gps_unsupported_au.rb