relaton-gb 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_gb/gb_scrapper.rb +2 -2
- data/lib/relaton_gb/sec_scrapper.rb +2 -2
- data/lib/relaton_gb/t_scrapper.rb +2 -2
- data/lib/relaton_gb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c00af5fa883925aa53e06bd93c8d98f8fb074ce0c5ac7cc14031e06610d48a4e
|
4
|
+
data.tar.gz: d216f984fb2a18aa832c90158e2b97c1ba72df08d0e627c2d46616092ef86c12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e3a85be4e92b9a1ee5206606dc5c78d4283a48c452417d2a545b4471775558312077fe64ad444f32486213af6f8c93aaebbe92d2f0a944f88fca3af804819b
|
7
|
+
data.tar.gz: 8e413f82216e8cd22baa3dca537726cdd4943fc20a9e606ee6a16e57d9517368d502472b1ad1832d8102e3ce6ccb47acb501781abfe01eb04cd4ae24979d06b8
|
@@ -28,7 +28,7 @@ module RelatonGb
|
|
28
28
|
Hit.new pid: pid, docref: ref.text, scrapper: self, release_date: rdate
|
29
29
|
end
|
30
30
|
HitCollection.new hits.sort_by(&:release_date).reverse
|
31
|
-
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
|
31
|
+
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
|
32
32
|
raise RelatonBib::RequestError, "Cannot access http://www.std.gov.cn/bzgk/gb/std_list"
|
33
33
|
end
|
34
34
|
|
@@ -38,7 +38,7 @@ module RelatonGb
|
|
38
38
|
src = "http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=" + hit.pid
|
39
39
|
doc = Nokogiri::HTML OpenURI.open_uri(src)
|
40
40
|
GbBibliographicItem.new **scrapped_data(doc, src, hit)
|
41
|
-
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
|
41
|
+
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
|
42
42
|
raise RelatonBib::RequestError, "Cannot access #{src}"
|
43
43
|
end
|
44
44
|
|
@@ -32,7 +32,7 @@ module RelatonGb
|
|
32
32
|
HitCollection.new hits
|
33
33
|
rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
|
34
34
|
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
|
35
|
-
OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
|
35
|
+
OpenSSL::SSL::SSLError, Errno::ETIMEDOUT, Net::OpenTimeout
|
36
36
|
raise RelatonBib::RequestError, "Cannot access #{uri}"
|
37
37
|
end
|
38
38
|
|
@@ -45,7 +45,7 @@ module RelatonGb
|
|
45
45
|
GbBibliographicItem.new **scrapped_data(doc, src, hit)
|
46
46
|
rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
|
47
47
|
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
|
48
|
-
OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
|
48
|
+
OpenSSL::SSL::SSLError, Errno::ETIMEDOUT, Net::OpenTimeout
|
49
49
|
raise RelatonBib::RequestError, "Cannot access #{src}"
|
50
50
|
end
|
51
51
|
|
@@ -33,7 +33,7 @@ module RelatonGb
|
|
33
33
|
Hit.new pid: pid, docref: docref, status: status, scrapper: self
|
34
34
|
end
|
35
35
|
HitCollection.new hits
|
36
|
-
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
|
36
|
+
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
|
37
37
|
raise RelatonBib::RequestError, "Cannot access http://www.ttbz.org.cn/Home/Standard"
|
38
38
|
end
|
39
39
|
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
@@ -44,7 +44,7 @@ module RelatonGb
|
|
44
44
|
src = "http://www.ttbz.org.cn#{hit.pid}"
|
45
45
|
doc = Nokogiri::HTML OpenURI.open_uri(src), nil, Encoding::UTF_8.to_s
|
46
46
|
GbBibliographicItem.new **scrapped_data(doc, src, hit)
|
47
|
-
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
|
47
|
+
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
|
48
48
|
raise RelatonBib::RequestError, "Cannot access #{src}"
|
49
49
|
end
|
50
50
|
|
data/lib/relaton_gb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-gb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|