sarafg11

Untitled

Aug 21st, 2020 (edited)
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. {
  2. "start_urls": [
  3. "https://supermercado.eroski.es/es/supermercado/2060401-higiene-y-belleza/2060523-parafarmacia-/5000119-higiene-bucodental/"
  4. ],
  5. "fields": {
  6. "name": "//h1/text()",
  7. "price": "//span[@class='price-now']//span[@itemprop='price']/text()",
  8. "price_old": "//div[@itemprop='offerDetails']/span[@class='price-before']/span[@itemprop='price']/text()",
  9. "reference": "",
  10. "image": "//img[@itemprop='image']//@src",
  11. "description": "//meta[@name='description']/@content",
  12. "brand": "",
  13. "brand_text": "",
  14. "categories": "",
  15. "availability": "",
  16. "rating_average": "//div[@id='ratingsZone']/div/div[@class='ratingSubtitle']/text()",
  17. "rating_count": "//div[@id='ratingsZone']//div[@class='ratingTitle']/span/text()",
  18. "barcode": "",
  19. "stock": "",
  20. "postal_code": "//script[@type='text/javascript' and contains(text(),'tienda')]/text()"
  21. },
  22. "links": {
  23. "detail": "//h2[@class='product-title']/a",
  24. "next_page": ""
  25. },
  26. "regex": {
  27. "postal_code": ["tienda\\\\\\\":\\\\\\\"(.*?)\\\\\\\"", 1]
  28. },
  29. "splash": {
  30. "positioning_spider": {
  31. "mode": "infinite_scroll",
  32. "request_type": "start_request",
  33. "args": {
  34. "timeout": 60
  35. }
  36. },
  37. "item_detail": [{
  38. "mode": "infinite_scroll",
  39. "request_type": "start_request",
  40. "args": {
  41. "timeout": 60
  42. }
  43. },
  44. {
  45. "mode": "simple_render",
  46. "request_type": "detail_request"
  47. }]
  48. },
  49. "list": {
  50. "product": "//div[contains(@class, 'product-item-')]",
  51. "page": ""
  52. },
  53. "preprocess": {
  54. "mode": "each_request",
  55. "url": "https://supermercado.eroski.es/en/login/delivery/index.selectdelivery.addressselector.homedeliveryform",
  56. "payload": {"zipCode": "01001"},
  57. "callback": "make_original_requests",
  58. "headers": {"Content-Type": "application/json"}
  59. },
  60. "pipelines": ["UrlAppendPostalCodePipeline"]
  61. }
Add Comment
Please, Sign In to add comment