Commit 09d5f2f3 authored by Bezleputh's avatar Bezleputh Committed by ntome

[foncia] fix #250 : website got updated

parent 10adc09d
......@@ -30,7 +30,7 @@ class FonciaBrowser(PagesBrowser):
BASEURL = 'https://fr.foncia.com'
cities = URL(r'/recherche/autocomplete\?term=(?P<term>.+)', CitiesPage)
housing = URL(r'/(?P<type>[^/]+)/.*/\d+.htm', HousingPage)
housing = URL(r'/(?P<type>[^/]+)/.*\d+.htm', HousingPage)
search_results = URL(r'/(?P<type>[^/]+)/.*', SearchResultsPage)
search = URL(r'/(?P<type>.+)', SearchPage)
......
......@@ -11,7 +11,7 @@ QUERY_HOUSE_TYPES = {
HOUSE_TYPES.HOUSE: ['maison'],
HOUSE_TYPES.PARKING: ['parking'],
HOUSE_TYPES.LAND: ['terrain'],
HOUSE_TYPES.OTHER: ['chambre',
HOUSE_TYPES.OTHER: ['chambre', 'programme-neuf',
'local-commercial', 'immeuble']
}
......@@ -19,6 +19,6 @@ AVAILABLE_TYPES = {
POSTS_TYPES.RENT: ['appartement', 'maison', 'parking', 'chambre',
'local-commercial'],
POSTS_TYPES.SALE: ['appartement', 'maison', 'parking', 'local-commercial',
'terrain', 'immeuble'],
'terrain', 'immeuble', 'programme-neuf'],
POSTS_TYPES.FURNISHED_RENT: ['appartement-meuble']
}
......@@ -91,15 +91,18 @@ class HousingPage(HTMLPage):
CleanText(
'//div[has-class("MiniData")]//p[has-class("MiniData-item")][1]'
),
r'(\d*\.*\d*) .*'
)
r'(\d*\.*\d*) .*',
default=NotAvailable
),
default=NotAvailable
)
obj_cost = CleanDecimal(
'//p[has-class("OfferTop-price")]'
'//span[has-class("OfferTop-price")]',
default=NotAvailable
)
obj_price_per_meter = PricePerMeterFilter()
obj_currency = Currency(
'//p[has-class("OfferTop-price")]'
'//span[has-class("OfferTop-price")]'
)
obj_location = Format(
'%s - %s',
......@@ -302,8 +305,10 @@ class SearchResultsPage(HTMLPage):
CleanText(
'.//div[has-class("MiniData")]//p[@data-behat="surfaceDesBiens"]'
),
r'(\d*\.*\d*) .*'
)
r'(\d*\.*\d*) .*',
default=NotAvailable
),
default=NotAvailable
)
obj_cost = CleanDecimal(
'.//strong[has-class("TeaserOffer-price-num")]'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment