Sha256: b01a45856ab0ad86634cde4658e70228fa5cf000a12cb9e8f90142c33205185a

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

class ScraperGooglePlay::Base

  def exist?(url)
  	uri = URI("#{url}")
		status_code = Net::HTTP.get_response(uri).code
		case status_code
		when '200'
			return true
		when '404'
			return false
		else
			return false
		end
  end

   def list_packname_with_page(page)
  	return nil if page.nil?
  	apps = []
  	page.search('.id-card-list.card-list .card.apps').each do |elm|
  		apps << elm.attr('data-docid')
  	end
  	apps  	
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scraper_google_play-0.1.2 lib/scraper_google_play/base.rb