email_data 1770511189.0.0 → 1771115673.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be394107e0b3e494dd5f5f0d7decf2eb98f5f395e1ad52987c3e41c695af243b
4
- data.tar.gz: 9db3dbcbc89537ef5e3b157af8446adb318fcc3ad3026dbad8245841a6abd478
3
+ metadata.gz: 2779ed93e4463ec6a2768c0b70f3859cfd8efdcfa522e9eb9ace0384640529e2
4
+ data.tar.gz: e61a7582023106b090c89e0b2e2807e7eb44e7ac41d468df954a54b621f1c941
5
5
  SHA512:
6
- metadata.gz: d3adf44778124266c0f88881d78e8771c5f96472d2c0d818ebd39416c19bde579293d5179c606c1d04e3dc07e6f1f37b8ff6d8784bdefd6ec3a1b71a31c5caf8
7
- data.tar.gz: 9312405e054179d66cfacc7e627df8138988476dc014ddd3859b6a77ac09ac37d0cad43dc146483fe3f242a979da3dcadd3c05b5620a23d6808edcbe8664db0f
6
+ metadata.gz: 3b2524c334539c45e8cfe23c7f813f5747a953d9c966a03e9ab84d98d764ead0ebcba36ba032b9ffb8ac04a3a8276502f0a604cda4fe6f7702c828fc0b103472
7
+ data.tar.gz: cbb93a1ea1d6093f8cecf8bf8165ee83fd0343ea902269fcea993795524fa224b4a46ff911745b196f267cbb6c3828a1f03b292d6bf852a92b2e2af432a4cd45
@@ -23,7 +23,7 @@ jobs:
23
23
  strategy:
24
24
  fail-fast: false
25
25
  matrix:
26
- ruby: ["3.1", "3.2", "3.3"]
26
+ ruby: ["3.1", "3.2", "3.3", "3.4", "4.0"]
27
27
  gemfile:
28
28
  - Gemfile
29
29
  services:
@@ -34,9 +34,7 @@ jobs:
34
34
  POSTGRES_HOST: localhost
35
35
  POSTGRES_PORT: 5432
36
36
  POSTGRES_HOST_AUTH_METHOD: trust
37
- options:
38
- --health-cmd pg_isready --health-interval 10s --health-timeout 5s
39
- --health-retries 5
37
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
40
38
 
41
39
  steps:
42
40
  - uses: actions/checkout@v6
@@ -45,9 +43,7 @@ jobs:
45
43
  with:
46
44
  path: vendor/bundle
47
45
  key: >
48
- ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
49
- hashFiles(matrix.gemfile) }}
50
-
46
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
51
47
  - name: Install PostgreSQL client
52
48
  run: |
53
49
  sudo apt -y install libpq-dev
data/bin/helpers.rb CHANGED
@@ -16,6 +16,7 @@ require "timeout"
16
16
  require "active_support/all"
17
17
  require "root_domain"
18
18
  require "email_data"
19
+ require "base64"
19
20
 
20
21
  EXCEPTIONS = File.read("#{__dir__}/../data/manual/exceptions.txt").lines.map(&:chomp)
21
22
 
@@ -3,25 +3,23 @@
3
3
 
4
4
  require_relative "helpers"
5
5
 
6
- def temp_mail_address
7
- path = "disposable/tempmailaddress.txt"
8
- url = "https://www.tempmailaddress.com/index/index"
6
+ def tempmail_io
7
+ path = "disposable/tempmail_io.txt"
8
+ url = "https://api.internal.temp-mail.io/api/v2/domains"
9
9
 
10
10
  refresh_list(url: url, path: path) do |response|
11
- data = JSON.parse(
12
- response.body.gsub(/[^-,:\w@.{}"]/, ""),
13
- symbolize_names: true
14
- )
15
- [data[:email].split("@").last]
11
+ JSON.parse(response.data)["domains"]
16
12
  end
17
13
  end
18
14
 
19
- def tempmail_io
20
- path = "disposable/tempmail_io.txt"
21
- url = "https://api.internal.temp-mail.io/api/v2/domains"
15
+ def load_10minute_mail
16
+ path = "disposable/10minutemail.txt"
17
+ url = "https://10minutemail.net/history.html"
22
18
 
23
19
  refresh_list(url: url, path: path) do |response|
24
- JSON.parse(response.data)["domains"]
20
+ JSON.parse(
21
+ Base64.decode64(response.body[/var domain_json_base64="(.*?)";/, 1])
22
+ )
25
23
  end
26
24
  end
27
25
 
@@ -115,7 +113,7 @@ def process_scraping(element, value_selector)
115
113
  when /^attr\((.*?)\)/
116
114
  value = element[Regexp.last_match(1)]
117
115
  else
118
- element.attributes.each do |_name, attr|
116
+ element.attributes.each_value do |attr|
119
117
  attr = attr.value.to_s
120
118
  value = attr if attr&.match?(host_regex)
121
119
  end
@@ -139,20 +137,14 @@ threads << thread { load_github_url("https://raw.githubusercontent.com/jespernis
139
137
  threads << thread { load_github_url("https://raw.githubusercontent.com/wesbos/burner-email-providers/master/emails.txt") }
140
138
  threads << thread { load_github_url("https://gist.github.com/fnando/dafe542cac13f831bbf5521a55248116/raw/disposable.txt") }
141
139
  threads << thread { load_github_url("https://raw.githubusercontent.com/bitbar/disposable-email-domains/master/domains.txt") }
142
- threads << thread { temp_mail_address }
143
140
  threads << thread { tempmail_io }
144
141
  threads << thread { moakt }
145
142
  threads << thread { load_file("disposable/disposable_manually_added.txt") }
146
-
147
- 10.times do
148
- threads << thread { domain_scraping("10minutemail", "https://10minutemail.net/?lang=en", "#fe_text::attr(value)") }
149
- end
150
-
143
+ threads << thread { load_10minute_mail }
151
144
  threads << thread { domain_scraping("forwardemail", "https://forwardemail.net/en/disposable-addresses", "code::text()") }
152
145
  threads << thread { domain_scraping("guerrillamail", "https://www.guerrillamail.com/", "select option::attr(value)") }
153
- threads << thread { domain_scraping("tempr", "https://tempr.email/", "select[name=DomainId] option::text()") }
154
- threads << thread { domain_scraping("fake_email_generator", "https://fakemailgenerator.net", "[data-mailhost]::attr(data-mailhost)") }
155
- threads << thread { domain_scraping("1secmail", "https://www.1secmail.com/", "select[id=domain] option::attr(value)") }
146
+ threads << thread { domain_scraping("tempr", "https://trashmailr.com", "#login-domains option::attr(value)") }
147
+ threads << thread { domain_scraping("fake_email_generator", "https://www.temporary-mail.net", ".dropdown-menu li b:last-of-type::text()") }
156
148
  threads << thread { domain_scraping("emailfake", "https://generator.email", ".tt-suggestion p::text()") }
157
149
  threads << thread { domain_scraping("emailfake", "https://emailfake.com/", ".tt-suggestion p::text()") }
158
150
  threads << thread { domain_scraping("emailfake", "https://email-fake.com/", ".tt-suggestion p::text()") }
@@ -186,11 +178,11 @@ end
186
178
 
187
179
  ignore_domains = normalize_list(File.read("#{__dir__}/../data/free_email_domains.txt").lines)
188
180
  .map do |domain|
189
- RootDomain.call(domain)
181
+ RootDomain.call(domain)
190
182
  end
191
183
  ignore_domains += normalize_list(File.read("#{__dir__}/../data/private_relays.txt").lines)
192
184
  .map do |line|
193
- RootDomain.call(line)
185
+ RootDomain.call(line)
194
186
  end
195
187
 
196
188
  puts "=> Normalize domains (count: #{domains.size})"