This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'restclient' | |
require 'digest/sha1' | |
require 'base64' | |
require 'securerandom' | |
require 'json' | |
class RavenCheck | |
@server_url | |
@api_key_name | |
@api_key_secret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'RestClient' | |
require 'nokogiri' | |
def getPrice(productId) | |
res = RestClient.get "https://www.digitec.ch/de/s1/product/#{productId}" | |
doc = Nokogiri::HTML(res.to_s) | |
doc.css("#product_reviewed > article .product-price").first.xpath('text()').text.strip.gsub("\u2013", "0").to_f | |
end | |
productId = '5721031' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
.bgimage { | |
position: fixed; | |
background-repeat: no-repeat; | |
background-position: center; | |
background-size: cover; | |
background-color: black; | |
width: 100%; |