Commit d0639afa authored by r888888888's avatar r888888888

fix popular search service

parent 1ea0dccd
......@@ -15,11 +15,11 @@ class PopularSearchService
def each_search(limit = 100, &block)
fetch_data.to_s.scan(/(.+?) (\d+)\.0\n/).slice(0, limit).each(&block)
JSON.parse(fetch_data.to_s).slice(0, limit).each(&block)
def tags
fetch_data.to_s.scan(/(.+?) (\d+)\.0\n/).map {|x| x[0]}
JSON.parse(fetch_data.to_s).map {|x| x[0]}
def fetch_data
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment