wedding_registry_scraper 0.0.2 → 0.0.3
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: cdde10975ee6f2819318a2482570e57f7f506d5c
|
4
|
+
data.tar.gz: f563bea9a46a59ce12f1716afcc63a69de34fb88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b4998f93832e42d6b6ab9b9fc3bf23fbb4a6c2db31160c922dec647e8fdcc9de6ffb7d3bd653cabf36f3559e8210a060fb45ac549629ce2e607a7b824c2b8c3
|
7
|
+
data.tar.gz: b983f9fcd8277d212f6f56d57c444aed5c69502aa0eae6476c3acc92f5a1c66779d75a6815d01838e115adaa69373d9e67017dd89f0e4bbc5990e7c3d456889c
|
@@ -24,11 +24,18 @@ private
|
|
24
24
|
product.css('[data-image-url]')[0]['data-image-url']
|
25
25
|
end
|
26
26
|
|
27
|
+
def get_needed_section(product)
|
28
|
+
product.css('.needed').text.strip
|
29
|
+
end
|
30
|
+
|
27
31
|
def get_remaining(product)
|
28
|
-
product
|
32
|
+
needed_text = get_needed_section(product)
|
33
|
+
/Still Needs: (\d+)/.match(needed_text) { $1 }.to_i
|
29
34
|
end
|
30
35
|
|
31
36
|
def get_desired(product)
|
37
|
+
needed_text = get_needed_section(product)
|
38
|
+
/Requested: (\d+)/.match(needed_text) { $1 }.to_i
|
32
39
|
end
|
33
40
|
|
34
41
|
def get_price(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.3
|
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-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unirest
|