Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "start_urls": [
- "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Cream-and-Coffee-Creamer/c/706-6040/loadMore?page=0",
- "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Milk/c/706-6108/loadMore?page=0",
- "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Non-Dairy-Alternatives/c/706-6113/loadMore?page=0",
- "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Yogurt-and-Cottage-Cheese/c/706-6163/loadMore?page=0"
- ],
- "fields": {
- "name": "(//h1[@class='name']/text())[1]",
- "price": "//div[@class='product-details rating-bottom']/span[@class='cart_reader']/text()",
- "price_old": "//div[@class='product-details rating-bottom']/del/text()",
- "reference": "",
- "image": "//div[contains(@class,'medias-slider')]//div/@data-zoom-image",
- "description": "//div[contains(@class,'gtm-product-detail-page')]//div[contains(@class,'description')]//p",
- "brand": "",
- "brand_text": "",
- "categories": "//li[@class='breadcrumb-item']/a[@class='breadcrumb-link']/text()",
- "availability": "//script[@type='application/ld+json' and contains(., 'availability')]/text()",
- "rating_average": "//div[@class='product-details']//div[@id='makerating']/@data-rating",
- "rating_count": "//div[@class='product-details']//div[@id='makerating']/span[@class='nb-review']/text()",
- "barcode": "//div[@class='about-sku-section']/text()",
- "stock": ""
- },
- "links": {
- "detail": "//div[@class='product-card__content']/a",
- "next_page": {
- "extractor_type": "modify_current_url",
- "finisher_xpath": "//li[contains(@class,'gtm-product')]",
- "process_value": {
- "func_name": "increment_qs_by_process_value",
- "func_args": {
- "qs_name": "page",
- "increase_by": 1
- }
- }
- }
- },
- "list": {
- "product": "//li[contains(@class,'gtm-product')]",
- "page": "substring-before(concat(//input[@name='currentPage']/@value + 1, '.'), '.')"
- },
- "regex": {
- "availability": ["availability\\\":\\\"(.*?)\\\"", 1],
- "barcode": ["(\\d{8}.*)", 1],
- "rating_average": ["rating\\\":(\\d|\\d.\\d{0,2})(=?\\d+,|,)", 1],
- "rating_count": ["(\\d+)", 1],
- "price": ["(\\d.*)", 1],
- "price_old": ["(\\d.*)", 1]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment