relaton-iso 1.16.3 → 1.16.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +2 -0
- data/lib/relaton_iso/scrapper.rb +9 -7
- data/lib/relaton_iso/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: 24973dcb87074a6029a83761f4690db8c53203e7a65928ea766ddeaa61b6d167
|
4
|
+
data.tar.gz: 15f8936150781349e849ec0a89edc2ba1e24cb7a105973d6479418a7c98f9ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae2ac0909781b8f8f196a259444cc55e3fc8d92eccca7f0d83da769dd27b10c0c95a3cc59e391a52e27cc0320f3149f4498b8004e8d259c98fa9bfa3947b7b81
|
7
|
+
data.tar.gz: 4143f5870f15be800efe77cac822c90e7a345c5d6613b1481e7f88598b7d50f701546eaf9138c8bbebde22ad6473a5a7c7e4f81768b3656855e43d91d7ec10d8
|
data/.github/workflows/rake.yml
CHANGED
data/lib/relaton_iso/scrapper.rb
CHANGED
@@ -389,23 +389,25 @@ module RelatonIso
|
|
389
389
|
def fetch_dates(doc, ref) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/MethodLength
|
390
390
|
dates = []
|
391
391
|
%r{^[^\s]+\s[\d-]+:(?<ref_date_str>\d{4})} =~ ref
|
392
|
-
pub_date_str = doc.
|
392
|
+
pub_date_str = doc.at("//span[@itemprop='releaseDate']")
|
393
393
|
if ref_date_str
|
394
394
|
ref_date = Date.strptime ref_date_str, "%Y"
|
395
|
-
if pub_date_str.
|
395
|
+
if pub_date_str.nil?
|
396
396
|
dates << { type: "published", on: ref_date_str }
|
397
397
|
else
|
398
|
-
pub_date = Date.strptime pub_date_str, "%Y"
|
398
|
+
pub_date = Date.strptime pub_date_str.text, "%Y"
|
399
399
|
if pub_date.year > ref_date.year
|
400
400
|
dates << { type: "published", on: ref_date_str }
|
401
|
-
dates << { type: "updated", on: pub_date_str }
|
401
|
+
dates << { type: "updated", on: pub_date_str.text }
|
402
402
|
else
|
403
|
-
dates << { type: "published", on: pub_date_str }
|
403
|
+
dates << { type: "published", on: pub_date_str.text }
|
404
404
|
end
|
405
405
|
end
|
406
|
-
elsif
|
407
|
-
dates << { type: "published", on: pub_date_str }
|
406
|
+
elsif pub_date_str
|
407
|
+
dates << { type: "published", on: pub_date_str.text }
|
408
408
|
end
|
409
|
+
corr_data = doc.at "//span[@itemprop='dateModified']"
|
410
|
+
dates << { type: "corrected", on: corr_data.text } if corr_data
|
409
411
|
dates
|
410
412
|
end
|
411
413
|
|
data/lib/relaton_iso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: algolia
|