Class: Racleta::Soundcreation

Inherits:
Object
  • Object
show all
Defined in:
lib/racleta/sites/soundcreation.rb

Overview

Parses soundcreation.ro Returns:

  • name

  • price

Constant Summary collapse

BASE_URL =
'https://www.soundcreation.ro'.freeze

Class Method Summary collapse

Class Method Details

.crawl(path) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/racleta/sites/soundcreation.rb', line 8

def self.crawl(path)
  Wombat.crawl do
    base_url BASE_URL
    path path
    name xpath: '//meta[@property="og:title"]/@content'
    price xpath: '//meta[@itemprop="price"]/@content', &:to_i
  end
end