SHOW:
|
|
- or go back to the newest paste.
1 | { | |
2 | "start_urls": | |
3 | [ | |
4 | "https://www.druni.es/perfumes/hombre", | |
5 | "https://www.druni.es/perfumes/mujer", | |
6 | "https://www.druni.es/perfumes/fragancias-lowcost" | |
7 | ], | |
8 | "fields": { | |
9 | "name": "//div[@class='product-info-main-inner']//span[@class='page-title' and @itemprop='name']/text()", | |
10 | "price": "//div[contains(@class, 'price-box')]//span[@class='price']/text()", | |
11 | "price_old": "//div[contains(@class, 'price-box')]//span[@data-price-type='oldPrice']/span[@class='price']/text()", | |
12 | "reference": "", | |
13 | "image": "//meta[@property='og:image']/@content", | |
14 | "description": "//div[@id='description']//text()", | |
15 | "brand": "", | |
16 | "brand_text": "//div[@class='product-brand']/div[contains(@class,'manufacturer')]/a[@class='value']/text()", | |
17 | "categories": "//div[@class='breadcrumbs']/ul/li[contains(@class,'category')]/a/text()", | |
18 | "availability": "//script[@type='application/ld+json' and contains(.,'availability')]/text()", | |
19 | "rating_average": "//script[@type='application/ld+json' and contains(.,'ratingValue')]/text()", | |
20 | "rating_count": "//script[@type='application/ld+json' and contains(.,'ratingCount')]/text()", | |
21 | "barcode": "", | |
22 | "stock": "", | |
23 | "variation": "//span[@class='product-item-name']/text()" | |
24 | }, | |
25 | "links": { | |
26 | "detail": "//div[@class='product-item-info']//a[@class='product-item-link']", | |
27 | "next_page": "//link[@rel='next']" | |
28 | }, | |
29 | "regex": { | |
30 | "availability": ["availability\\\":\\s\\\"(.*?)\\\"", 1], | |
31 | "rating_average": ["ratingValue\\\":\\\"(.*?)\\\"", 1], | |
32 | "rating_count": ["ratingCount\\\":\\\"(.*?)\\\"", 1], | |
33 | "price": ["(\\d*,\\d{1,2})", 1], | |
34 | "price_old": ["(\\d*,\\d{1,2})", 1] | |
35 | }, | |
36 | "pipelines": ["UrlVariationPipeline"], | |
37 | "list": { | |
38 | "product": "//div[@class='item']" | |
39 | }, | |
40 | "parser_modules": ["multiple_product_variations_xpath"] | |
41 | } |