Sha256: 96dd8757fc0e58c04e2039b8f8142538289b6cfdab980d7ffbb97dc3f6cc09a2
Contents?: true
Size: 1.41 KB
Versions: 6
Compression:
Stored size: 1.41 KB
Contents
class ScraperGooglePlay::Category < ScraperGooglePlay::Base def initialize(category_name) @category_name = category_name.upcase @agent = Mechanize.new unless exist?("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}") @page = nil else @page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}") end end def all_app return nil unless @page list_packname_with_page(@page) end def topselling_paid return nil unless @page sub_page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}/collection/topselling_paid") list_packname_with_page(sub_page) end def topselling_free return nil unless @page sub_page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}/collection/topselling_free") list_packname_with_page(sub_page) end def topgrossing return nil unless @page sub_page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}/collection/topgrossing") list_packname_with_page(sub_page) end def topselling_new_paid return nil unless @page sub_page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}/collection/topselling_new_paid") list_packname_with_page(sub_page) end def topselling_new_free return nil unless @page sub_page = @agent.get("#{ScraperGooglePlay::CATEGORYURL}#{@category_name}/collection/topselling_new_free") list_packname_with_page(sub_page) end private end
Version data entries
6 entries across 6 versions & 1 rubygems