wedding_registry_scraper 0.0.6 → 0.0.7

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: 5d8773e57fa2aff9cfceea050e4ee16713cb75f9
4
- data.tar.gz: 373b3abffa0e75eebb28234c08f4ae29d19d36c6
3
+ metadata.gz: 24c491599c14f52a1bf804d0fdecfe229c62f565
4
+ data.tar.gz: 4aed9ee48466c5cf1b302f8ec8453a5c0a9d3316
5
5
  SHA512:
6
- metadata.gz: 52f046314cabb11d5251e82e37b8f9d7cfadf63804f696cc65f3f3375daa2cde8e19e00a3c80caefd36db36bc92be77349476110bf745fca93acd140dc6f8822
7
- data.tar.gz: 0841a1975c3fc383e48af6d8b1bf0d1e603258233e64c9f940bd56db00dbe554c2fb5f314bddf97542ea7f97b2ae8580aebbcc0f996632206f6473d3bd5bb03d
6
+ metadata.gz: 20290c0b9d2265c62a86992eff6ff14d21fc5b90430972b0a99e448f411546f2703e9306a724e3af6c1431383c3b0dd98721e3ebdf0938430977641e704541b3
7
+ data.tar.gz: 7b9a6f0f23c56d12fe8aee2e8a79f16ca2392b232cc00995403d92fc4f93774f1cd81546ad4e24e717c9346799221144d79ef66994f972299d844b0926ae082a
@@ -33,7 +33,12 @@ private
33
33
  result = Unirest.get(details_url)
34
34
  doc = Nokogiri::HTML(result.body)
35
35
 
36
- image_url = doc.css('#zoomLink')[0]['href']
36
+ if (obj = doc.css('#zoomLink')).present?
37
+ image_url = obj[0]['href']
38
+ elsif (obj = doc.css('#js-product-primary-img')).present?
39
+ image_url = obj[0]['data-high-res-img']
40
+ end
41
+
37
42
  "https://www.rei.com/#{image_url.sub(/^\//,'')}"
38
43
  end
39
44
 
@@ -1,5 +1,5 @@
1
1
  module WeddingRegistryScraper
2
- VERSION = Gem::Version.new("0.0.6")
2
+ VERSION = Gem::Version.new("0.0.7")
3
3
 
4
4
  def self.version
5
5
  VERSION
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.6
4
+ version: 0.0.7
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-08-19 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unirest