tempsms22 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/tempsms22.rb +21 -17
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2f1fd393f37114c069d82fb8c9932623c38419c657998fc54f6214137578357
|
4
|
+
data.tar.gz: 7e9cfd4ea9f7ecb7989ca4b32da8379ac51013e6191234ff4977629278203305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd4584335f7320be63bedf137cdb3bcf550c83652f67ebbae95e8971dc5cff475aa878f70bb2b3b68cfbc11a91a0b18a208121f77b26c08aded7ef1460e2f146
|
7
|
+
data.tar.gz: d65aa6e3644d61cb30ba82c3f5b17024c4c9b1bd76de9a3d2c9632d57f7a37192ca5cefa2ead0a8dfcd2bf8e4a70af9dab58a9e81a8c46d6a60e65b50625d166
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/tempsms22.rb
CHANGED
@@ -5,42 +5,46 @@
|
|
5
5
|
# description: Scrapes the temporary SMS number from receive-smss.com.
|
6
6
|
|
7
7
|
require 'nokorexi'
|
8
|
+
require 'ostruct'
|
8
9
|
|
9
10
|
|
10
11
|
class TempSMS22
|
11
12
|
|
12
|
-
|
13
|
+
attr_accessor :number
|
13
14
|
|
14
15
|
def initialize()
|
15
|
-
@url = 'https://receive-smss.com/'
|
16
|
-
get_smsnum()
|
17
|
-
end
|
18
16
|
|
19
|
-
|
17
|
+
@url = 'https://receive-smss.com/'
|
20
18
|
|
21
|
-
|
22
|
-
doc = Nokorexi.new(url).to_doc
|
23
|
-
table = doc.root.element('//table')
|
19
|
+
doc = Nokorexi.new(@url).to_doc
|
24
20
|
|
25
|
-
a =
|
26
|
-
x.
|
21
|
+
@a = doc.root.xpath('//a[@class="number-boxes1-item-button"]').map do |x|
|
22
|
+
x.attributes[:href][/\d+/]
|
27
23
|
end
|
28
24
|
|
29
|
-
|
25
|
+
get_smsnum()
|
26
|
+
end
|
30
27
|
|
28
|
+
def number()
|
29
|
+
@number = @a.sample
|
31
30
|
end
|
32
31
|
|
33
|
-
|
32
|
+
def numbers()
|
33
|
+
@a
|
34
|
+
end
|
34
35
|
|
35
|
-
def
|
36
|
+
def read(number=@number)
|
36
37
|
|
37
|
-
|
38
|
+
url = @url + 'sms/' + number + '/'
|
39
|
+
doc = Nokorexi.new(url).to_doc
|
40
|
+
table = doc.root.element('//table')
|
38
41
|
|
39
|
-
a =
|
40
|
-
x.
|
42
|
+
a = table.xpath('tbody/tr').map do |x|
|
43
|
+
x.xpath('td').map {|y| y.plaintext.strip }
|
41
44
|
end
|
42
45
|
|
43
|
-
|
46
|
+
a.map {|x| OpenStruct.new(%i(from text date).zip(x).to_h) }
|
47
|
+
|
44
48
|
end
|
45
49
|
|
46
50
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tempsms22
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
ztXMxbpG+JjUz/fW9/Hgk0gp01NgNz0mgAvQ/T1kKnXzjCX/emLM/BELrgG+A50g
|
36
36
|
DiofcFRVJjgBmAXWh6f6wfj9
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-05-
|
38
|
+
date: 2022-05-29 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: nokorexi
|
metadata.gz.sig
CHANGED
Binary file
|