takuhai_status 1.9.1 → 1.9.2
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 +4 -4
- data/lib/takuhai_status/kuronekoyamato.rb +12 -13
- data/lib/takuhai_status/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e522f263b0eb304f8608b2a75f409e56fa82bf189df9e16526be9078287612d2
|
4
|
+
data.tar.gz: e51c2802c0b787e2d8cee70808f70110afbe4d85604a62085f04a12cc81c6691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf3f2e9f09a240136aca68ccc4daf6482af80509c8c388392982b36832c72cab04c461ebf4efe0c5375415421ad4c0a19d6b253e2d71724a821ce07a8704b288
|
7
|
+
data.tar.gz: 593cc21411fe24e2eb91689a751a39336251b872c220b358d6c4013619323fc622efa8764b8e1a2b67b8bc2ee40906b46ef6af8cdf630552313745c61c866d74
|
@@ -20,22 +20,21 @@ module TakuhaiStatus
|
|
20
20
|
def check
|
21
21
|
conn = Faraday.new(url: 'http://toi.kuronekoyamato.co.jp/')
|
22
22
|
res = conn.post('/cgi-bin/tneko', {number00: '1', number01: @key})
|
23
|
-
doc = Nokogiri(res.body)
|
23
|
+
doc = Nokogiri(res.body.force_encoding('UTF-8'))
|
24
24
|
|
25
25
|
begin
|
26
|
-
|
27
|
-
state =
|
28
|
-
|
29
|
-
|
30
|
-
time = Time.parse("#{sday} #{stime}")
|
26
|
+
current = doc.css('.tracking-invoice-block-detail ol li').last
|
27
|
+
state = "#{current.css('.item').text} [#{current.css('.name').text}]"
|
28
|
+
month, day, hour, minute = current.css('.date').text.split(/[^\d]+/)
|
29
|
+
time = Time.local(Time.now.year, month, day, hour, minute)
|
31
30
|
|
32
|
-
if state == '国内到着'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
31
|
+
#if state == '国内到着'
|
32
|
+
# begin
|
33
|
+
# time, state = global_state(doc)
|
34
|
+
# rescue
|
35
|
+
# $stderr.puts "error in yamato global, about #{key}"
|
36
|
+
# end
|
37
|
+
#end
|
39
38
|
|
40
39
|
return time, state
|
41
40
|
rescue NoMethodError
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: takuhai_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.2.22
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: get delivery status of Takuhai-bin in Japan
|