directlink 0.0.4.0 → 0.0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/directlink.gemspec +1 -1
- data/lib/directlink.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a07a4e3fb181e173d60d07dfa59aeb271d96465
|
4
|
+
data.tar.gz: 0e8903a3ae585b36bccca7830f4344fbbf642b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b623472083860ac4b05f4ed972c3c6aa8cf3c7f8909930b001eeb183c5e480977afe2df8868ec86b82f9e7f0055a2d7c8dee711226781675c5fef4fab74d0007
|
7
|
+
data.tar.gz: 6ea8634f8953a26d98e01a285528ef11c67b21e4ca4efad13dca031b47a002161a02152cc203200edfdf1babecb5cb5667fd2f53345b18eb641113b26f4592c1
|
data/README.md
CHANGED
@@ -91,7 +91,7 @@ $ export FLICKR_API_KEY=dc2bfd348b...
|
|
91
91
|
|
92
92
|
If the passed link is not the image link or a photo page of a known image hosting, the tool is still able to find the main images that the linked webpage contains (here it found three images in the markdown file):
|
93
93
|
```
|
94
|
-
$
|
94
|
+
$ directlink https://github.com/Nakilon/dhash-vips
|
95
95
|
<= https://github.com/Nakilon/dhash-vips
|
96
96
|
=> https://camo.githubusercontent.com/852607c7f4b604fc3c83b782c4f6983cf488b0d4/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f64686173682d766970732e6e616b696c6f6e2e70726f2f64686173685f69737375655f6578616d706c652e706e67
|
97
97
|
png 592x366
|
data/directlink.gemspec
CHANGED
data/lib/directlink.rb
CHANGED
@@ -199,7 +199,6 @@ module DirectLink
|
|
199
199
|
imageinfo.first["url"]
|
200
200
|
end
|
201
201
|
|
202
|
-
|
203
202
|
class_variable_set :@@directlink, Struct.new(:url, :width, :height, :type)
|
204
203
|
end
|
205
204
|
|
@@ -305,7 +304,7 @@ def DirectLink link, max_redirect_resolving_retry_delay = nil, giveup = false
|
|
305
304
|
end
|
306
305
|
l[html].group_by(&:first).map{ |k, v| [k.join(?>), v.map(&:last)] }.tap do |result|
|
307
306
|
next unless result.empty?
|
308
|
-
raise unless t = html.at_css
|
307
|
+
raise unless t = html.at_css("meta[@property='og:image']")
|
309
308
|
return DirectLink t[:content], nil, true
|
310
309
|
end.max_by{ |_, v| v.map{ |i| i.width * i.height }.inject(:+) / v.size }.last
|
311
310
|
else
|