Sha256: 9e1d9df208a2fda93c8bb4f36998f3456119a5500df031585f8e9bbdfc4ad5de

Contents?: true

Size: 689 Bytes

Versions: 19

Compression:

Stored size: 689 Bytes

Contents

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

      matches do
        http
        with("play.")
        domain("google")
        tld("com")
        with("/store/apps/")
      end

      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

19 entries across 19 versions & 1 rubygems

Version Path
onebox-1.3.8 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.7 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.6 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.5 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.4 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.3 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.2 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.1 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.3.0 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.9 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.8 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.7 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.6 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.5 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.4 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.3 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.2 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.1 lib/onebox/engine/google_play_app_onebox.rb
onebox-1.2.0 lib/onebox/engine/google_play_app_onebox.rb