

def load_price_currency(self, xpath, spider_name=''):
    try:
        text = ' '.join(self.selector.xpath(xpath).extract())
        (price, currency) = parse_price_currency(text, self.context)
        self.add_value(F_PRICE, price)
        spider_name.add_value(F_CURRENCY, currency)
    except Exception as e:
        self.add_value(F_PRICE, MISSING_VALUE)
        site = SITE_MODEL.objects.get(spider_name=spider_name)
        self.add_value(F_CURRENCY, site.country.currency)
        raise_missing_value(spider_name=self.context['spider_name'], field_name=F_PRICE, url=self.context[F_URL], exception=e, level=STATUS_CRITICAL, message='Could not load price and currency.', category=PARSING_ERROR)

dataset/ETHPy150Open tryolabs/daywatch/daywatch/core/scraper/item_scraper/items.py DealLoader.load_price_currency/VarMisuse@64/77 `self`->`spider_name`