mirror of
https://github.com/aykhans/PostScrape.git
synced 2025-04-15 22:33:11 +00:00
images added
This commit is contained in:
parent
67c45e3c70
commit
bc3caf3b51
@ -27,6 +27,8 @@ class ToScrapeCSSSpider(scrapy.Spider):
|
||||
yield response.follow(f"https://turbo.az{next_page}", callback=self.parse, headers=self.headers)
|
||||
|
||||
def parse_detail_url(self, r):
|
||||
images = [r.xpath('//a[@class="product-photos-large"]/@href').get()]
|
||||
images += r.xpath('//div[@class="product-photos"]/div/a/@href').getall()
|
||||
if r.xpath('//div[@class="shop-container"]'):
|
||||
avto_salon = True
|
||||
phone = r.xpath('//div[@class="shop-contact--phones-list"]//a[@class="shop-contact--phones-number"]/text()').getall()
|
||||
@ -90,6 +92,7 @@ class ToScrapeCSSSpider(scrapy.Spider):
|
||||
yield {
|
||||
'url': r.url,
|
||||
'avto_salon': avto_salon,
|
||||
'images': images,
|
||||
'phone': phone,
|
||||
'extra_fields': extra_fields,
|
||||
'description': description,
|
||||
|
Loading…
x
Reference in New Issue
Block a user