onebox 1.9.28.3 → 1.9.28.4
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/twitter_status_onebox.rb +5 -1
- 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: 2f0921bd8d91072c930eccee436ef05e362fbe20b0d4ec8d39cecb74580723c9
|
4
|
+
data.tar.gz: 58ff915a7d3a7dcbf2a7a0bcaf66366ad6210ba17b84695695be9a067c54be92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eb93e33a7c8c4919d47d03975545d08be18038d83e6b763ab5e7fabb1fe9b9a1ddc35a688656234e37231dff9b131900e87d00d0363e5e6f3454d9dad2988ed
|
7
|
+
data.tar.gz: 7097f982b53eb11d057f601af63e928941f086534a03ec7d92eb7794bf2981a9138d6891add442f52345b91a70f611397a86e4647a7302a12991d8560c5c96ba
|
@@ -10,10 +10,14 @@ module Onebox
|
|
10
10
|
matches_regexp(/^https?:\/\/(mobile\.|www\.)?twitter\.com\/.+?\/status(es)?\/\d+(\/(video|photo)\/\d?+)?+(\/?\?.*)?\/?$/)
|
11
11
|
always_https
|
12
12
|
|
13
|
+
def http_params
|
14
|
+
{ 'User-Agent' => 'DiscourseBot/1.0' }
|
15
|
+
end
|
16
|
+
|
13
17
|
private
|
14
18
|
|
15
19
|
def get_twitter_data
|
16
|
-
response = Onebox::Helpers.fetch_response(url) rescue nil
|
20
|
+
response = Onebox::Helpers.fetch_response(url, nil, nil, http_params) rescue nil
|
17
21
|
html = Nokogiri::HTML(response)
|
18
22
|
twitter_data = {}
|
19
23
|
html.css('meta').each do |m|
|
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.28.
|
4
|
+
version: 1.9.28.4
|
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: 2020-
|
13
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|