lita-onewheel-amazon-product 0.4.2 → 0.5.0
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: 69187fc6262c32d2a9f89dc7efb0bade62a77519
|
4
|
+
data.tar.gz: e459127c39e54536ed78a14a3b32591ae741bbae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea963d2fe6c8cd64146d9c3419082291c28113fcae98f3ee56488852e8ccb3d7e295865dcc95b6064b36a99646ddcc5b2527df7657ed2f8fcef55fa298e5c9a
|
7
|
+
data.tar.gz: 9d54f7e4cadf9f58bd63ebdf05c15c895d9e329155e260c59b0028168a88688cd8a0b7aa788a4e10814732e1bbee2e7fd5b79cc191c31ec3e45a612cf0baa3c4
|
@@ -53,9 +53,14 @@ module Lita
|
|
53
53
|
price_node = noko_doc.css('td.dp-price-col span.a-color-price')
|
54
54
|
end
|
55
55
|
|
56
|
+
if price_node.empty?
|
57
|
+
price_node = noko_doc.css('div#olp_feature_div span.a-color-price')
|
58
|
+
end
|
59
|
+
|
56
60
|
unless price_node.empty?
|
57
61
|
price = price_node.first.content.to_s
|
58
62
|
end
|
63
|
+
|
59
64
|
price
|
60
65
|
end
|
61
66
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-amazon-product'
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.5.0'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to post information about amazon products.}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
<!doctype html><html class="a-no-js" data-19ax5a9jf="dingo"><link rel="preconnect" href="http://z-ecx.images-amazon.com"><link rel="preconnect" href="http://g-ecx.images-amazon.com">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<link rel="canonical" href="http://www.amazon.com/Tamarack-Technologies-2400-Film-Scanner/dp/B00004TH24" />
|
6
|
+
<meta name="description" content="Amazon.com: Tamarack Technologies 2400 FS Film Scanner: Electronics" />
|
7
|
+
<meta name="title" content="Amazon.com: Tamarack Technologies 2400 FS Film Scanner: Electronics" />
|
8
|
+
<meta name="keywords" content="Tamarack Technologies 2400 FS Film Scanner,Tamarack,AX2400KIT" />
|
9
|
+
<title>Amazon.com: Tamarack Technologies 2400 FS Film Scanner: Electronics</title>
|
10
|
+
</head>
|
11
|
+
<body id="dp">
|
12
|
+
<div id="olp_feature_div" class="feature" data-feature-name="olp">
|
13
|
+
<div class="a-section a-spacing-small a-spacing-top-small">
|
14
|
+
<span class="olp-padding-right"><a href="/gp/offer-listing/B00004TH24/ref=dp_olp_new?ie=UTF8&condition=new">1 new</a> from <span class='a-color-price'>$159.99</span></span>
|
15
|
+
<span class="olp-padding-right"><a href="/gp/offer-listing/B00004TH24/ref=dp_olp_used?ie=UTF8&condition=used">2 used</a> from <span class='a-color-price'>$105.00</span></span>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -53,4 +53,10 @@ describe Lita::Handlers::OnewheelAmazonProduct, lita_handler: true do
|
|
53
53
|
send_message('http://www.amazon.com/dp/B0154LAIQU?psc=1')
|
54
54
|
expect(replies.last).to eq nil
|
55
55
|
end
|
56
|
+
|
57
|
+
it 'finds data on new and used third party prices' do
|
58
|
+
mock_fixture('film_scanner_price')
|
59
|
+
send_message('http://www.amazon.com/Tamarack-Technologies-2400-Film-Scanner/dp/B00004TH24')
|
60
|
+
expect(replies.last).to eq('$159.99 Tamarack Technologies 2400 FS Film Scanner')
|
61
|
+
end
|
56
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-amazon-product
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lita-onewheel-amazon-product.gemspec
|
154
154
|
- spec/fixtures/55_gallons_of_lube_price.html
|
155
155
|
- spec/fixtures/book_price.html
|
156
|
+
- spec/fixtures/film_scanner_price.html
|
156
157
|
- spec/fixtures/infant_circumcision_price.html
|
157
158
|
- spec/fixtures/kindle_book_price.html
|
158
159
|
- spec/fixtures/our_price.html
|
@@ -187,6 +188,7 @@ summary: See above.
|
|
187
188
|
test_files:
|
188
189
|
- spec/fixtures/55_gallons_of_lube_price.html
|
189
190
|
- spec/fixtures/book_price.html
|
191
|
+
- spec/fixtures/film_scanner_price.html
|
190
192
|
- spec/fixtures/infant_circumcision_price.html
|
191
193
|
- spec/fixtures/kindle_book_price.html
|
192
194
|
- spec/fixtures/our_price.html
|