sarafg11

Untitled

Nov 25th, 2020 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. {
  2. "start_urls": [
  3. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Cream-and-Coffee-Creamer/c/706-6040/loadMore?page=0",
  4. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Milk/c/706-6108/loadMore?page=0",
  5. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Non-Dairy-Alternatives/c/706-6113/loadMore?page=0",
  6. "https://www.grocerygateway.com/store/groceryGateway/en/Dairy-and-Eggs/Yogurt-and-Cottage-Cheese/c/706-6163/loadMore?page=0"
  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. "extractor_type": "modify_current_url",
  28. "finisher_xpath": "//li[contains(@class,'gtm-product')]",
  29. "process_value": {
  30. "func_name": "increment_qs_by_process_value",
  31. "func_args": {
  32. "qs_name": "page",
  33. "increase_by": 1
  34. }
  35. }
  36. }
  37. },
  38. "list": {
  39. "product": "//li[contains(@class,'gtm-product')]",
  40. "page": "substring-before(concat(//input[@name='currentPage']/@value + 1, '.'), '.')"
  41. },
  42. "regex": {
  43. "availability": ["availability\\\":\\\"(.*?)\\\"", 1],
  44. "barcode": ["(\\d{8}.*)", 1],
  45. "rating_average": ["rating\\\":(\\d|\\d.\\d{0,2})(=?\\d+,|,)", 1],
  46. "rating_count": ["(\\d+)", 1],
  47. "price": ["(\\d.*)", 1],
  48. "price_old": ["(\\d.*)", 1]
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment