Adaptado capturer y base de datos para soportar datos de m2 con
decimales.
This commit is contained in:
parent
dd3362aa3c
commit
71456d3c92
5 changed files with 145 additions and 84 deletions
|
|
@ -202,7 +202,7 @@ class AdHtmlParser:
|
|||
posible_m2 = [tag.text for tag in soup.find('div', {'class': 'info-features'}).find_all('span')]
|
||||
if [posible for posible in posible_m2 if 'm²' in posible]:
|
||||
self.ad_fields['m2']['value'] = \
|
||||
[''.join(re.findall(r'[0-9]', posible)) for posible in posible_m2 if 'm²' in posible][0]
|
||||
[''.join(re.findall(r'[0-9]+,*[0-9]*', posible)) for posible in posible_m2 if 'm²' in posible][0].replace(',', '.')
|
||||
self.ad_fields['m2']['found'] = True
|
||||
|
||||
if soup.find('title') is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue