sarafg11

Untitled

Oct 5th, 2020 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. {
  2. "start_urls": [
  3. "https://www.elcorteingles.es/altus/deportes/",
  4. "https://www.elcorteingles.es/trangoworld/deportes/",
  5. "https://www.elcorteingles.es/izas/deportes/"
  6. ],
  7. "fields": {
  8. "name": "//li[@class='products_list-item']/span/@data-json",
  9. "price": "//li[@class='products_list-item']/span/@data-json",
  10. "image": "//img[contains(@class,'js_preview_image')]/@src",
  11. "brand_text": "//li[@class='products_list-item']/span/@data-json",
  12. "categories": "//li[@class='products_list-item']/span/@data-json",
  13. "url": "//h2[contains(@class,'plp_title')]/a/@href"
  14. },
  15. "links": {
  16. "item_detail": {
  17. "detail": "",
  18. "next_page": {
  19. "restrict_xpaths": "//li[@id='pagination-next']/a",
  20. "callback": "parse_item"
  21. },
  22. "parse_start_url": true
  23. },
  24. "positioning_spider": {
  25. "detail": "//h2/a[contains(@class,'product_preview-title')]",
  26. "next_page": "//li[@id='pagination-next']/a"
  27. }
  28. },
  29. "regex": {
  30. "price": ["f_price\\\":(.*?),", 1],
  31. "name": ["name\\\":\\\"(.*?)\\\"", 1],
  32. "brand_text": ["brand\\\":\\\"(.*?)\\\"", 1],
  33. "categories": ["hierarchy\\\":.*\\\"(.*?)\\\"\\]", 1]
  34. },
  35. "list": {
  36. "product": "//li[@class='products_list-item']",
  37. "page": "substring-before(substring-after(//li[@id='pagination-current']/text(), 'Página '), ' de')",
  38. "default_page": 1
  39. },
  40. "parser_modules": [
  41. "multiple_response_xpath",
  42. "multiple_item_xpath"
  43. ]
  44. }
Add Comment
Please, Sign In to add comment