parent
a7bfe202c4
commit
86889e7f4a
@ -1,13 +0,0 @@
|
|||||||
import scrapy
|
|
||||||
|
|
||||||
class ScrapePerils(scrapy.Spider):
|
|
||||||
name = "perils"
|
|
||||||
start_urls = ["https://www.marseille.fr/logement-urbanisme/am%C3%A9lioration-de-lhabitat/arretes-de-peril"]
|
|
||||||
|
|
||||||
def parse(self, response):
|
|
||||||
for adresses in response.xpath('//div[@class="card"]//li'):
|
|
||||||
yield {
|
|
||||||
'adresse': adresses.xpath('./text()').get(),
|
|
||||||
'dernier arrêté hors modificatif' : adresses.xpath('./a[not(contains(translate(.,"MODIF","modif"),"modif"))][last()]/text()').get(),
|
|
||||||
'dernier arrêté' : adresses.xpath('./a[last()]/text()').get(),
|
|
||||||
}
|
|
||||||
Loading…
Reference in new issue