leboncoin: parsing OK, time to add St-Etienne
This commit is contained in:
parent
251f3c107e
commit
ccf5ddda5b
|
@ -50,7 +50,14 @@ class LeboncoinSpider(scrapy.Spider):
|
||||||
json = response.json()
|
json = response.json()
|
||||||
ads = json["ads"]
|
ads = json["ads"]
|
||||||
for ad in ads:
|
for ad in ads:
|
||||||
pass
|
yield {
|
||||||
|
'url': ad['url'],
|
||||||
|
'type': ad['attributes'][0]['value_label'],
|
||||||
|
'price': ad['price'],
|
||||||
|
'rooms': ad['attributes'][2]['value'],
|
||||||
|
'bedrooms': 'Unknown',
|
||||||
|
'area': ad['attributes'][1]['value']
|
||||||
|
}
|
||||||
|
|
||||||
total_ads_nb = json["total"]
|
total_ads_nb = json["total"]
|
||||||
next_offset = self.data["offset"] + self.data["limit"]
|
next_offset = self.data["offset"] + self.data["limit"]
|
||||||
|
|
Loading…
Reference in New Issue