better domain/desc splitting in quackit script

This commit is contained in:
Aidan Feldman 2014-06-19 01:21:32 -04:00
parent 03da6a79fa
commit 78814f7e09

View File

@ -71,7 +71,7 @@ task :quackit_import do
new_domains = Set.new
doc = Nokogiri::HTML(open('http://www.quackit.com/domain-names/country_domain_extensions.cfm'))
doc.css('#content li').each do |li|
desc = li.content.split(/\s+-\s+/)[1]
desc = li.content.split(/\s+-\s+/, 2)[1]
if desc =~ /academic|education|school/i
domain_el = li.at_css('b')
# some lines have more than one domain listed