Sha256: 5f68aca2ce187f2ce6d459440e4c8880fd0de773050c3613f232c534570e7966
Contents?: true
Size: 763 Bytes
Versions: 1
Compression:
Stored size: 763 Bytes
Contents
#!/usr/bin/env ruby require "yaml" require "json" require "net/http" whitelisted_emails = %w( onet.pl poczta.onet.pl fastmail.fm hushmail.com hush.ai hush.com hushmail.me naver.com qq.com example.com yandex.net gmx.com gmx.es webdesignspecialist.com.au vp.com onit.com asics.com freemail.hu ) existing_emails = File.open("config/disposable_email_domains.txt") { |f| f.read.split("\n") } url = "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.txt" resp = Net::HTTP.get_response(URI.parse(url)) remote_emails = resp.body.split("\n").flatten - whitelisted_emails result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort File.open("config/disposable_email_domains.txt", "w") {|f| f.write result_emails.join("\n") }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valid_email2-4.0.2 | pull_mailchecker_emails.rb |