Sha256: 27d748baed806a547f6e4440f3e07c03db43e08535eeb6264cc1f83e7e0ef548

Contents?: true

Size: 431 Bytes

Versions: 30

Compression:

Stored size: 431 Bytes

Contents

#!/usr/bin/env ruby

require 'nokogiri'
require 'open-uri'

url = 'http://old.rt.ru/en/help-info/mg/index.php?SELECTED_CHAR='

codes = %w{A B C D E F G H I J K L M N O P R S T U V Y Z}.collect do |c|
  data = Nokogiri::HTML(open(url + c))
  data.css("table.fmain_table tbody tr td:nth-child(3)").collect {|e| e.text.split(/,/).collect {|str| str.strip } }
end.flatten.uniq.compact.reject {|str| str =~ /\D/ }

puts codes.join("|")

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
phonie-3.3.1 tools/russian_area_codes.rb
phonie-3.2.2 tools/russian_area_codes.rb
phonie-3.2.1 tools/russian_area_codes.rb
phonie-3.2.0 tools/russian_area_codes.rb
phonie-3.1.15 tools/russian_area_codes.rb
phonie-3.1.14 tools/russian_area_codes.rb
phonie-3.1.13 tools/russian_area_codes.rb
phonie-3.1.12 tools/russian_area_codes.rb
phonie-3.1.11 tools/russian_area_codes.rb
phonie-3.1.10 tools/russian_area_codes.rb
phonie-3.1.9 tools/russian_area_codes.rb
phonie-3.1.8 tools/russian_area_codes.rb
phonie-3.1.7 tools/russian_area_codes.rb
phonie-3.1.6 tools/russian_area_codes.rb
phonie-3.1.5 tools/russian_area_codes.rb
phonie-3.1.4 tools/russian_area_codes.rb
phonie-3.1.3 tools/russian_area_codes.rb
phonie-3.1.2 tools/russian_area_codes.rb
phonie-3.1.1 tools/russian_area_codes.rb
phonie-3.1.0 tools/russian_area_codes.rb