jakal 0.1.94 → 0.1.95
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jkl.rb +2 -8
- metadata +2 -2
data/lib/jkl.rb
CHANGED
@@ -16,11 +16,8 @@ module Jkl
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def topix_links(keyphrase)
|
20
|
-
url = YAML::load_file('config/config.yml')['topix'] ||
|
21
|
-
"http://www.topix.net/rss/search/article?q="
|
19
|
+
def topix_links(keyphrase, url = "http://www.topix.net/rss/search/article?q=")
|
22
20
|
links("#{url}#{keyphrase}")
|
23
|
-
rescue Errno::ENOENT
|
24
21
|
end
|
25
22
|
|
26
23
|
def tags(key, link)
|
@@ -28,11 +25,8 @@ module Jkl
|
|
28
25
|
Jkl::Extraction::tags(key, text)
|
29
26
|
end
|
30
27
|
|
31
|
-
def trends
|
32
|
-
url = YAML::load_file('config/config.yml')['twitter'] ||
|
33
|
-
"http://search.twitter.com/trends.json"
|
28
|
+
def trends(url = "http://search.twitter.com/trends.json")
|
34
29
|
JSON.parse(Jkl::get_from(url))["trends"].map{|t| t["name"]}
|
35
|
-
rescue Errno::ENOENT
|
36
30
|
end
|
37
31
|
end
|
38
32
|
end
|