youpy-www-favicon 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/www/favicon.rb +5 -6
- metadata +1 -1
data/lib/www/favicon.rb
CHANGED
@@ -5,16 +5,15 @@ require 'hpricot'
|
|
5
5
|
|
6
6
|
module WWW
|
7
7
|
class Favicon
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.3'
|
9
9
|
|
10
10
|
def find(url)
|
11
|
-
|
12
|
-
html
|
13
|
-
|
14
|
-
find_from_html(html, uri)
|
11
|
+
html = request(URI(url)).body
|
12
|
+
find_from_html(html, url)
|
15
13
|
end
|
16
14
|
|
17
|
-
def find_from_html(html,
|
15
|
+
def find_from_html(html, url)
|
16
|
+
uri = URI(url)
|
18
17
|
find_from_link(html, uri) || try_default_path(uri)
|
19
18
|
end
|
20
19
|
|