'Update the device prices.'

@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):

    import bs4
    import requests
    import re
    sess = requests.session()
    request = sess.get('https://{}/{}'.format(self.domain, self.product_id), allow_redirects=True, timeout=1)
    soup = bs4.BeautifulSoup(request.text, 'html.parser')
    raw = soup.find_all('span', attrs={'itemprop': 'name'})
    self.device_name = raw[1].string
    prices = []
    for tmp in soup.find_all('span', attrs={'class': 'gh_price'}):
        matches = re.search(self.regex, tmp.string)
        raw = '{}.{}'.format(matches.group(1), matches.group(2))
        prices += [float(raw)]
    prices.sort()
    self.prices = prices[1:]
    price_match = soup.find('span', attrs={'class': 'gh_price'})
    matches = re.search('\xe2\x82\xac|\xc2\xa3|PLN', price_match.string)
    self.unit_of_measurement = matches.group()
