onebox 1.9.22 → 1.9.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/amazon_onebox.rb +2 -2
- data/lib/onebox/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: c59fdb0a75faf98373d219999658d29423c81273fc2540b288721e083261d000
|
4
|
+
data.tar.gz: 842cfdd7957c5fd862ec7ed7931d5d61adf96656577bb2fe3c837dff436e4e57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c38c486f923c0dece67558435c43b0f80759e5020a360a726087b211eb17ffe932df872fd1d61f615935e32559ad895f7dcf05c48820d1720efd0b14b821d7
|
7
|
+
data.tar.gz: 3dff1e9e38bf2a4a9940688f5399e851ce9ee5607ab917caf41a2435e01cfccda13808959fd8e804e3e1c39a3cef4579bd85f2ddfc68ac02bc129dd4a33053e5
|
@@ -35,7 +35,7 @@ module Onebox
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def match
|
38
|
-
@match ||= @url.match(/(?:d|g)p\/(?:product\/)?(?<id>[^\/]+)(?:\/|$)/mi)
|
38
|
+
@match ||= @url.match(/(?:d|g)p\/(?:product\/|video\/detail\/)?(?<id>[^\/]+)(?:\/|$)/mi)
|
39
39
|
end
|
40
40
|
|
41
41
|
def image
|
@@ -157,7 +157,7 @@ module Onebox
|
|
157
157
|
result[:by_info] = Onebox::Helpers.clean(result[:by_info].inner_html) if result[:by_info]
|
158
158
|
|
159
159
|
summary = raw.at("#productDescription")
|
160
|
-
result[:description] = og.description || (summary && summary.inner_text)
|
160
|
+
result[:description] = og.description || (summary && summary.inner_text) || CGI.unescapeHTML(Onebox::Helpers.truncate(raw.css("meta[name=description]").first["content"], 250))
|
161
161
|
end
|
162
162
|
|
163
163
|
result[:price] = nil if result[:price].start_with?("$0") || result[:price] == 0
|
data/lib/onebox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-11-
|
13
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|