wedding_registry_scraper 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d22e94eb87fb609ffe686dc63ce92cc37d6be4c
|
4
|
+
data.tar.gz: adbf5add3f714063c28b79316c6a2015c83cf2f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05c2880daa0a0ca54bd3aa7a495cba7f4303f350a0084eae42b40910adb9d80974a1cfe58cb6ee2edc83deb212e43aaa2cde411445395a94ce46703f4a475294
|
7
|
+
data.tar.gz: 21b057dc8ba776a21aae3021600bfa83cb954211f36089fa0b29b55fd8f89813881a0db39e8b7d95b1f6f1c2c0184113544ea6de07ddfe4553cb6e2e37efef73
|
@@ -18,8 +18,13 @@ private
|
|
18
18
|
|
19
19
|
def get_sku(product)
|
20
20
|
text = product.css('.ctxProductCol .tinyText').map(&:text).detect { |t| t =~ /SKU/ }
|
21
|
-
|
22
|
-
|
21
|
+
if text
|
22
|
+
sku = text.match(/SKU:\s+(\S+)/)[1]
|
23
|
+
"heath:#{sku}"
|
24
|
+
else
|
25
|
+
title = product.css('.ctxProductCol .attentionText').text.parameterize
|
26
|
+
"heath:#{title}"
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
def get_url(product)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wedding_registry_scraper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Pariser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unirest
|