Created
July 6, 2012 07:38
-
-
Save ywjno/3058714 to your computer and use it in GitHub Desktop.
get you would like DomainsList from pool.com
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
# encoding: utf-8 | |
# * First, you would to got PoolDeletingDomainsList.txt from [here](http://www.pool.com/Downloads/PoolDeletingDomainsList.zip) | |
# * Unzip this zip file, get PoolDeletingDomainsList.txt file, put the txt file in this file on one folder | |
# * In shell or cmd, run `ruby domains.rb`, you will get you would like domains list in DomainsList.txt file | |
# * There are 6 length domain, so change the length if you would. | |
class Domains | |
def self.would_domains(input_file = "PoolDeletingDomainsList.txt", output_file = "DomainsList.txt") | |
input_file = $1 if $1 | |
output_file = $2 if $2 | |
this_file_path = File.dirname(File.expand_path(__FILE__)) | |
File.open("#{this_file_path}/#{output_file}", 'w') do |file| | |
File.readlines("#{this_file_path}/#{input_file}").each do |line| | |
file.puts line if line =~ /^([a-z][aiueo][a-z]{1, 4})\.com.+/ || line =~ /^([b-df-hj-np-tvxz][aiueowy][aiueo][b-df-hj-np-tvxz][a-z]{1, 2})\.com.+/ | |
end | |
end | |
puts "ok" | |
end | |
end | |
Domains.would_domains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment