Sha256: b28648b2b913bc9e31566b81af0b703aa42097d0c16174dbb57e978787ca5c8c
Contents?: true
Size: 751 Bytes
Versions: 1
Compression:
Stored size: 751 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 ) 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.1 | pull_mailchecker_emails.rb |