delivery_state_jp 1.0.15 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/delivery_state_jp.gemspec +1 -1
- data/lib/delivery_state_jp/base.rb +2 -0
- data/lib/delivery_state_jp/version.rb +1 -1
- data/lib/delivery_state_jp/yamato.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa069a0a6854374d68e0bb2b82ecea5ce55e6772eacbc555385972ecd140536f
|
4
|
+
data.tar.gz: e82446f2f894a47ae463cf34015a4e0c7730b086b1e9f5cc945043b9588f4516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf8ac60a98032e858f773d9e73888fc713b8107275de6d3e8b8005ffcadab0f21687d603bd3aef1afe949bdb257b54472f2328c62c303a4fe20c61d5abc4724c
|
7
|
+
data.tar.gz: c389dd79d4f86f15aac97287aa12d287761aec970d5e4f20b1fd2e2c271fc56661f3f54abcad671a6f0c2b9f19dac7d72fccab8f9de518ec835cb3acbb47cc3c
|
data/README.md
CHANGED
data/delivery_state_jp.gemspec
CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
33
33
|
spec.add_development_dependency 'rake', '~> 10.0'
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
|
-
# spec.
|
35
|
+
# spec.add_dependency 'pry-byebug'
|
36
36
|
end
|
@@ -1,8 +1,9 @@
|
|
1
1
|
module DeliveryStateJp
|
2
2
|
class Yamato < DeliveryStateJp::Base
|
3
3
|
def self.delivery_state(args)
|
4
|
-
doc = Nokogiri::HTML.parse(response_body(args), nil, charset)
|
5
|
-
|
4
|
+
doc = Nokogiri::HTML.parse(response_body(args).force_encoding("UTF-8"), nil, charset)
|
5
|
+
# binding.pry
|
6
|
+
content = doc.xpath('/html/body/p/script[4]').first.content
|
6
7
|
if m = content.match(/1件目.+\n.+.+\n.+\n.+swd.write.+>(?<state>.+)\<br\>\<\/font\>\<\/td\>/)
|
7
8
|
m[:state]
|
8
9
|
else
|