relaton-cen 1.16.2 → 1.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_cen/scrapper.rb +5 -2
- data/lib/relaton_cen/version.rb +1 -1
- 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: 2536bccf8d4ddbd3215a965683a22eea51e8739ea65a45b3f41a5f46fb63a035
|
4
|
+
data.tar.gz: 148612cdbba0da00f7e81e34c3c79e038cb85cb6249ff9923b0dc7267acb9afb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb0ea3431e54f1b1aade2bb02153c24ac4b2a531cd29e246b7b7cd0caf0af999da18ec56a4ecac1d2a7c125ac8148731d0dc27ec65a58b876f8a719006af9ce
|
7
|
+
data.tar.gz: 56bf1b0df47893249c88a05547fe5c2048112079b32499a5c673979ff05cf2c7a54402cd533d58ad8c986302e26681c4c3f66fd2ea39c097993c977701c58e95
|
data/lib/relaton_cen/scrapper.rb
CHANGED
@@ -41,8 +41,11 @@ module RelatonCen
|
|
41
41
|
# @param doc [Mechanize::Page]
|
42
42
|
# @return [Array<RelatonIsobib::Ics>]
|
43
43
|
def fetch_ics(doc)
|
44
|
-
doc.xpath("//tr[th[.='ICS']]/td/text()").
|
45
|
-
|
44
|
+
doc.xpath("//tr[th[.='ICS']]/td/text()").filter_map do |ics|
|
45
|
+
ics_code = ics.text.match(/[^\s]+/).to_s.gsub("\u00A0", "")
|
46
|
+
next if ics_code.empty?
|
47
|
+
|
48
|
+
RelatonIsoBib::Ics.new ics_code
|
46
49
|
end
|
47
50
|
end
|
48
51
|
|
data/lib/relaton_cen/version.rb
CHANGED