lib/jkl.rb in jakal-0.1.93 vs lib/jkl.rb in jakal-0.1.94
- old
+ new
@@ -18,10 +18,11 @@
def topix_links(keyphrase)
url = YAML::load_file('config/config.yml')['topix'] ||
"http://www.topix.net/rss/search/article?q="
links("#{url}#{keyphrase}")
+ rescue Errno::ENOENT
end
def tags(key, link)
text = Jkl::Text::sanitize(Jkl::get_from(link))
Jkl::Extraction::tags(key, text)
@@ -29,8 +30,9 @@
def trends
url = YAML::load_file('config/config.yml')['twitter'] ||
"http://search.twitter.com/trends.json"
JSON.parse(Jkl::get_from(url))["trends"].map{|t| t["name"]}
+ rescue Errno::ENOENT
end
end
end