sarafg11

Untitled

Sep 30th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2. "start_urls": [
  3. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Cream-and-Coffee-Creamer/c/706-6040",
  4. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Milk/c/706-6108",
  5. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Non-Dairy-Alternatives/c/706-6113",
  6. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Yogurt-and-Cottage-Cheese/c/706-6163"
  7. ],
  8. "fields": {
  9. "name": "(//h1[@class='name']/text())[1]",
  10. "price": "//div[@class='product-details rating-bottom']/span[@class='cart_reader']/text()",
  11. "price_old": "//div[@class='product-details rating-bottom']/del/text()",
  12. "reference": "",
  13. "image": "//div[contains(@class,'medias-slider')]//div/@data-zoom-image",
  14. "description": "//div[contains(@class,'gtm-product-detail-page')]//div[contains(@class,'description')]//p",
  15. "brand": "",
  16. "brand_text": "",
  17. "categories": "//li[@class='breadcrumb-item']/a[@class='breadcrumb-link']/text()",
  18. "availability": "//script[@type='application/ld+json' and contains(., 'availability')]/text()",
  19. "rating_average": "//div[@class='product-details']//div[@id='makerating']/@data-rating",
  20. "rating_count": "//div[@class='product-details']//div[@id='makerating']/span[@class='nb-review']/text()",
  21. "barcode": "//div[@class='about-sku-section']/text()",
  22. "stock": ""
  23. },
  24. "links": {
  25. "detail": "//div[@class='product-card__content']/a",
  26. "next_page": ""
  27. },
  28. "splash": {
  29. "item_detail": {
  30. "mode": "load_click_content",
  31. "request_type": "start_request",
  32. "args": {
  33. "private_mode": false,
  34. "element_selector": "div#showMore",
  35. "content_loaded_check": "document.getElementsByClassName('line-behind-show-more')[0].style.display != 'none'"
  36. }
  37. }
  38. },
  39. "regex": {
  40. "availability": ["availability\\\":\\\"(.*?)\\\"", 1],
  41. "barcode": ["(\\d{8}.*)", 1],
  42. "rating_average": ["rating\\\":(\\d|\\d.\\d{0,2})(=?\\d+,|,)", 1],
  43. "rating_count": ["(\\d+)", 1],
  44. "price": ["(\\d.*)", 1],
  45. "price_old": ["(\\d.*)", 1]
  46. }
  47. }
Add Comment
Please, Sign In to add comment