Skip to content

Commit

Permalink
Fix nsreg_regru (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrezvova authored May 22, 2024
2 parents e58ee5b + 64ca40a commit f5242a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grabber/nsreg/spiders/nsreg_regru.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def __init__(self, name=None, **kwargs):
path={
'price_reg': '/html/body/div[1]/div/div[4]/article/div/div[2]/div[4]/div/table/tbody/tr[1]/td[2]/abbr/strong/text()',
'price_prolong': '/html/body/div[1]/div/div[4]/article/div/div[2]/div[4]/div/table/tbody/tr[1]/td[2]/abbr/em/text()',
'price_change': '/html/body/div[1]/div/article/div[3]/div/div[2]'
'price_change': '/html/body/div[1]/div/article/section[2]/div[1]/article/section/ul/li[2]/strong[2]/text()'
}
)

def parse_price_change(self, response):
price_change = response.xpath(self.component.path['price_change']).get()
price_change = find_price(r"[\s\S]+(\d{3,}) руб.[\s\S]+", price_change)
price_change = find_price(r"([0-9]+)", price_change)

item = NsregItem()
item['name'] = "ООО «РЕГ.РУ»"
Expand Down

0 comments on commit f5242a9

Please sign in to comment.