This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the list of top sites for a given country from Alexa, found here: | |
# http://www.alexa.com/topsites/countries/<country code> | |
# and transform it into a nice text file, one domain per line. | |
# Supply the country code as the first argument. Defaults to US. | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
BASE_URL = "http://www.alexa.com/topsites/countries" | |
country = ARGV[0] || "FR" |