sarafg11

Untitled

Aug 19th, 2020 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. {
  2. "start_urls":
  3. [
  4. "https://www.walmart.ca/search/silk/N-117+1021453",
  5. "https://www.walmart.ca/search/danone/N-117",
  6. "https://www.walmart.ca/search/oikos/N-117",
  7. "https://www.walmart.ca/search/activia/N-117",
  8. "https://www.walmart.ca/search/international%20delight/N-117"
  9. ],
  10. "fields": {
  11. "name": "//h1[@data-automation='product-title']/text()",
  12. "price": "//div[@id='product-overview']//span[@class='price-group']/span[@itemprop='price']/@content|//div[@id='product-overview']//span[@class='price-group']/span[@itemprop='lowPrice']/@content",
  13. "price_old": "//div[@id='product-overview']//div[contains(@class,'price-old')]/span//span[@class='visuallyhidden']/text()",
  14. "reference": "",
  15. "image": "//meta[@property='og:image']/@content",
  16. "description": "//script[@type='application/ld+json'][1]/text()",
  17. "brand": "",
  18. "brand_text": "//span[@data-automation='brand']//text()",
  19. "categories": "//ol[@class='breadcrumb-list']/li[@class='breadcrumb']/a/span/text()",
  20. "availability": "//link[@itemprop='availability']/@href",
  21. "rating_average": "//script[@type='application/ld+json'][2]/text()",
  22. "rating_count": "//script[@type='application/ld+json'][2]/text()",
  23. "barcode": "//script[@type='application/ld+json'][1]/text()",
  24. "stock": ""
  25. },
  26. "links": {
  27. "detail": "//a[@class='product-link']",
  28. "next_page": "//ul[@class='paginator-list']/li[@class='active']/following-sibling::li[1]/a"
  29. },
  30. "regex":{
  31. "price_old": ["was(.*)", 1],
  32. "description": ["\\\"description\\\":\\\"(.*?)\\\",", 1],
  33. "rating_average": ["\\\"ratingValue\\\":\\\"(.*?)\\\",", 1],
  34. "rating_count": ["\\\"reviewCount\\\":\\\"(.*?)\\\",", 1],
  35. "barcode": ["\\\"sku\\\":\\\"(.*?)\\\",", 1]
  36. },
  37. "parser_modules": ["walmart_single_item"]
  38. }
Add Comment
Please, Sign In to add comment