Sha256: 6639f6c784a36b5bee5f6d4839f3ddf47765b4109099af23f5927ef1149fb3d3
Contents?: true
Size: 785 Bytes
Versions: 7
Compression:
Stored size: 785 Bytes
Contents
module MarketBot module Android # Search query pages are extremely similar to leaderboard pages. # Amazingly, this inheritence hack works! class SearchQuery < MarketBot::Android::Leaderboard def initialize(query, options={}) super(query, nil, options) end def market_urls(options={}) results = [] min_page = options[:min_page] || 1 max_page = options[:max_page] || 25 (min_page..max_page).each do |page| start_val = (page - 1) * 24 url = "https://play.google.com/store/search?" url << "q=#{URI.escape(identifier)}&" url << "c=apps&start=#{start_val}&" url << "num=24&hl=en" results << url end results end end end end
Version data entries
7 entries across 7 versions & 1 rubygems