Sha256: 9bcb82d947b68d6b4d02a9a460b0f41dc2b7272385c6a956b62bd6fd1f50f920

Contents?: true

Size: 659 Bytes

Versions: 15

Compression:

Stored size: 659 Bytes

Contents

module Onebox
  module Engine
    class GooglePlayAppOnebox
      include Engine
      include LayoutSupport
      include HTML

      matches_regexp Regexp.new("^http(?:s)?://play\\.(?:(?:\\w)+\\.)?(google)\\.com(?:/)?/store/apps/")

      private

      def data
        {
          link: link,
          title: raw.css(".document-title div").inner_text,
          developer: raw.css(".document-subtitle.primary").inner_text,
          image: raw.css(".cover-image").first["src"],
          description: raw.css(".text-body div").inner_text,
          price: raw.css(".price.buy meta[itemprop=price]").first["content"]
        }
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
onebox-1.5.5 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.5.3 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.5.2 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.5.1 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.5.0 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.9 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.8 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.7 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.5 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.4 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.3 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.2 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.1 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.4.0 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.9 lib/onebox/engine/google_play_app_onebox.rb