Successfully reported this slideshow.
Your SlideShare is downloading. ×

Expediente Xpath #SEOnderground 2021

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 66 Ad

Expediente Xpath #SEOnderground 2021

Charla sobre el lenguaje XPATH aplicado a SEO, desde cero, con herramientas, cheatsheet y consejos para usarlo con Screaming Frog.

Sigue otros contenidos y actualizaciones sobre SEO en:
https://twitter.com/mjcachon

Guía de Screaming Frog: https://rana.ninja/guia-definitiva-de-screaming-frog/

Charla sobre el lenguaje XPATH aplicado a SEO, desde cero, con herramientas, cheatsheet y consejos para usarlo con Screaming Frog.

Sigue otros contenidos y actualizaciones sobre SEO en:
https://twitter.com/mjcachon

Guía de Screaming Frog: https://rana.ninja/guia-definitiva-de-screaming-frog/

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to Expediente Xpath #SEOnderground 2021 (20)

Advertisement

More from MJ Cachón Yáñez (20)

Recently uploaded (20)

Advertisement

Expediente Xpath #SEOnderground 2021

  1. 1. X EXPEDIENTE
  2. 2. #SEOnderground @mjcachon Antes de nada… GRACIAS
  3. 3. #SEOnderground @mjcachon HOLA Consultora SEO y dirigiendo laikateam.com Escribo en mi blog mjcachon.com Participo en Ministerio SEO youtube.com/ministerioSEO Promoviendo Mujeres en SEO mujeresenseo.es Me llamo MJ X X X X
  4. 4. #SEOnderground @mjcachon ¿Lenguaje XPATH? Extraer datos del código HTML
  5. 5. #SEOnderground @mjcachon Qué pinta tiene //title //@href //h1 //a[contains(@rel, 'nofollow')]
  6. 6. #SEOnderground @mjcachon Categorías de ecommerce NOMBRE PRODUCTO PRECIO Y DESCUENTO OPINIONES Y RATINGS STOCK TEXTO CATEGORÍA NOMBRE CATEGORÍA
  7. 7. #SEOnderground @mjcachon Fichas de ecommerce MARCA ID PRODUCTO Nº IMÁGENES OPINIONES Y RATINGS PRECIOS
  8. 8. #SEOnderground @mjcachon Post de contenido AUTOR FECHA IDIOMA CATEGORÍA TÍTULO ÍNDICE
  9. 9. #SEOnderground @mjcachon Toolkit Xpath Inspector de Chrome Función importXML (G.Sheets) Plugin Xpath Helper Plugin Scraper Screaming Frog (Custom) X X X X X
  10. 10. #SEOnderground @mjcachon ¿De qué nos estás hablando, MJ?
  11. 11. #SEOnderground @mjcachon Qué es Xpath “XPath (XML Path Language) es un lenguaje que permite construir expresiones que recorren y procesan un documento XML. La idea es parecida a las expresiones regulares para seleccionar partes de un texto sin atributos (plain text). XPath permite buscar y seleccionar teniendo en cuenta la estructura jerárquica del XML.” “XPath puede utilizarse para navegar por los elementos y atributos de un documento XML.”
  12. 12. #SEOnderground @mjcachon Conceptos básicos de Xpath html head title Evento SEOnderground body h1 ¡El SEOnderground 2021 ya está aquí! a href pagina p El evento SEO del año elemento texto atributo
  13. 13. #SEOnderground @mjcachon Conceptos básicos de Xpath elemento = html tag texto = texto entre etiquetas atributo = característica de un elemento <a href=“https://seonderground.com/”> El mejor evento SEO de 2021 </a>
  14. 14. #SEOnderground @mjcachon Relaciones en Xpath MADRE HIJOS HERMANOS DESCENDIENTES DE H1
  15. 15. #SEOnderground @mjcachon Sintaxis en Xpath Item Explicación Ejemplo Ejemplo Xpath Nodo elemento Una etiqueta html <a href=“url”> anchor text </a> //a Nodo atributo Una característica de un elemento <a href=“url”> anchor text</a> //a/@href Nodo texto Texto dentro de un elemento <p> esto es un texto </p> //p // Seleccionar nodo actual //title / Seleccionar root /html/head/title count() Función que cuenta count(//title) starts-with Filtrar elementos que empiezan por… //a[starts-with(@href, ‘https’)] contains Filtrar elementos que contienen… //div[contains(@class, ‘main’)]
  16. 16. #SEOnderground @mjcachon Sintaxis en Xpath FULL ABREVIADA /html/head/title //title
  17. 17. #SEOnderground @mjcachon Retos de Xpath Cada web, su HTML específico Entender bases del lenguaje Metodología de análisis Sintaxis full o abreviada X X X X
  18. 18. #SEOnderground @mjcachon Ejemplo Quiero extraer TODOS los nombres de charlas (h3) https://seonderground.com/agenda/
  19. 19. #SEOnderground @mjcachon Xpath Helper para pruebas https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl 1. INSTALAR 2. ACTIVAR
  20. 20. #SEOnderground @mjcachon Ejemplo 3. INSPECCIONAR ELEMENTO 4. COPIAR XPATH
  21. 21. #SEOnderground @mjcachon Copiando Xpath 1 5. PROBAR
  22. 22. #SEOnderground @mjcachon Pensando la etiqueta html 18
  23. 23. #SEOnderground @mjcachon Contando la etiqueta html 18
  24. 24. #SEOnderground @mjcachon Metodología de análisis 1. ¿Qué datos queremos extraer? 2. ¿Cómo está construido el html? 3. Pruebas de expresiones xpath 4. Extracción en Screaming Frog
  25. 25. #SEOnderground @mjcachon Casos de uso genéricos SEO
  26. 26. #SEOnderground @mjcachon Expresiones universales para SEO ¿Qué extrae? Expresión XPath Title //title Meta Description //meta[@name='description']/@content Canonical URL //link[@rel='canonical']/@href Meta Robots //meta[@name='robots']/@content Hreflang //link[@rel=’alternate’]/@hreflang Viewport mobile //meta[@name=’viewport’]@content H1 //h1 Rel nofollow //a[contains(@rel, 'nofollow')] Alt text //img/@alt Imágenes sin alt text //img[not(@alt)]/@src Enlaces http //a[starts-with(@href,’http://’)] Enlaces internos //a[contains(@href,’tudominio.com')] Enlaces externos //a[not(contains(@href,’tudominio.com’))]
  27. 27. #SEOnderground @mjcachon Atributos de enlaces ENLACES NOFOLLOW O SPONSORED O UGC //a[contains(@rel,’nofollow’)] | //a[contains(@rel,’sponsored’)] | //a[contains(@rel,’ugc’)] Haz pruebas con esta url https://www.economiadigital.es/ideas/
  28. 28. #SEOnderground @mjcachon Atributos de enlaces 13
  29. 29. #SEOnderground @mjcachon Enlaces HTTP ENLACES HTTP //a[starts-with(@href,’http://’)] Haz pruebas con esta url https://searchengineland.com/how-to-test-your-content- site-strategy-for-continued-improvement-374471
  30. 30. #SEOnderground @mjcachon ¿Cuántos enlaces http hay?
  31. 31. #SEOnderground @mjcachon Enlazado ENLACES INTERNOS EXTERNOS //a[not(contains(@href,'searchengineland.com'))] //a[contains(@href,'searchengineland.com')] Haz pruebas en esta url https://searchengineland.com/how-to-test-your-content- site-strategy-for-continued-improvement-374471
  32. 32. #SEOnderground @mjcachon Enlazado ENLACES INTERNOS ENLACES EXTERNOS
  33. 33. #SEOnderground @mjcachon Casos de uso en contenidos + Screaming Frog
  34. 34. #SEOnderground @mjcachon Elementos del post https://www.screamingfrog.co.uk/seo-spider-16/
  35. 35. #SEOnderground @mjcachon Contenido: dentro de esa class
  36. 36. #SEOnderground @mjcachon Expresiones para contenido ¿Qué extrae? Expresión XPath Lista de Enlaces totales del contenido //div[@class='main-blog--posts_single--inside']/descendant::*/a Recuento Enlaces totales del contenido count(//div[@class='main-blog--posts_single--inside']/descendant::*/a) Lista de Enlaces internos del contenido //div[@class='main-blog--posts_single-- inside']/descendant::*/a[contains(@href,'screamingfrog.co.uk')] Primer enlace del contenido //div[@class='main-blog--posts_single--inside']/descendant::a[1]/@href Nº de imágenes en el contenido //div[@class='main-blog--posts_single-- inside']//img[contains(@loading,'lazy')]/@src Nº Enlaces en el nombre de los comentarios count(//div[contains(@class, 'comhead')]/a/@href) Nº Enlaces en el cuerpo de los comentarios count(//div[contains(@class, 'says')]/descendant::a/@href) Cuántas veces aparece una palabra clave //div[@class='main-blog--posts_single-- inside']/descendant::*/a[contains(translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),'spider')] Haz pruebas con: https://www.screamingfrog.co.uk/seo-spider-16/
  37. 37. #SEOnderground @mjcachon Probamos todos los Xpath Todos los enlaces del post
  38. 38. #SEOnderground @mjcachon Probamos todos los Xpath Nº imágenes del post
  39. 39. #SEOnderground @mjcachon Probamos todos los Xpath Primer enlace del post
  40. 40. #SEOnderground @mjcachon Fuera del contenido: el autor Nombre del autor
  41. 41. #SEOnderground @mjcachon Fuera del contenido: comentarios Nº de comentarios
  42. 42. #SEOnderground @mjcachon PRO TIP Prueba las expresiones a fondo antes de continuar: te ahorrarás mucho tiempo después
  43. 43. #SEOnderground @mjcachon Nos vamos a Screaming Frog
  44. 44. #SEOnderground @mjcachon Custom Extraction Screaming Frog
  45. 45. #SEOnderground @mjcachon Conozcamos un poco más a los protagonistas
  46. 46. #SEOnderground @mjcachon ¿Cómo son los autores? * Basado en una selección aleatoria de 50 artículos
  47. 47. #SEOnderground @mjcachon ¿Cómo son los autores? 23,89% 19,39% 18,03% 11,84% 5,54% 5,14% 4,74% 4,23% 2,95% 1,95% 1,18% 1,11% 0,00% 5,00% 10,00% 15,00% 20,00% 25,00% 30,00% screamingfrog Mark Porter Patrick Langridge Richard Lawther Daniel Cartland Freddy Barnes Paudy Heal Oliver Brett Tom Jeffery Jack Prouse Bex Stirling Stephen Pritchard ¿Qué autores escriben más contenido? 18,53% 18,10% 28,02% 3,88% 15,95% 2,59% 4,31% 3,45% 4,31% 56,66% 15,31% 8,35% 5,96% 3,98% 2,58% 2,58% 1,39% 0,99% Mark Porter Patrick Langridge screamingfrog Freddy Barnes Richard Lawther Tom Jeffery Oliver Brett Paudy Heal Daniel Cartland Jack Prouse Bex Stirling Stephen Pritchard ¿Cómo enlazan los autores? Enlace Interno Enlace Externo
  48. 48. #SEOnderground @mjcachon ¿Cómo son los autores? 35,87% 18,67% 14,93% 12,80% 6,40% 3,20% 3,07% 2,27% 1,20% 0,67% 0,67% 0,27% 0,00% 5,00% 10,00% 15,00% 20,00% 25,00% 30,00% 35,00% 40,00% screamingfrog Patrick Langridge Richard Lawther Mark Porter Paudy Heal Freddy Barnes Daniel Cartland Oliver Brett Jack Prouse Stephen Pritchard Tom Jeffery Bex Stirling ¿Quién recibe más comentarios? 38,72% 16,84% 12,67% 13,89% 6,42% 52,73% 21,82% 14,55% 7,27% 1,82% 0,00% 10,00% 20,00% 30,00% 40,00% 50,00% 60,00% 70,00% 80,00% 90,00% 100,00% screamingfrog Patrick Langridge Richard Lawther Mark Porter Paudy Heal Freddy Barnes Daniel Cartland Oliver Brett Jack Prouse Stephen Pritchard Tom Jeffery Bex Stirling ¿Cómo son los enlaces en comentarios? Enlaces en nombre Enlaces en cuerpo
  49. 49. #SEOnderground @mjcachon Pueden lucir aún mejor
  50. 50. #SEOnderground @mjcachon Casos de uso en ecommerce + Screaming Frog
  51. 51. #SEOnderground @mjcachon Analizar por separado
  52. 52. #SEOnderground @mjcachon Expresiones para SEO ecommerce ¿Qué extrae? Expresión XPath Precio actual //div[contains(@id,'precio')] Precio antiguo //div[contains(@id,'discountPrices')]/div[2] Nº imágenes de ficha de producto count(//div[contains(@id,'thumbs_list')]/ul/li) Descripción de producto //div[contains(@class,'productInfosContent__description')] Nº colores del producto count(//div[contains(@class,'attribute_list')]/ul/li) Texto superior de categorías //div[contains(@class,'rte')]/p Texto inferior de categorías //p[contains(@class,'text-justify')] Nº artículos //div[contains(@class,'categories-top')]/h1/span Breadcrumb 1 //span[contains(@class,'navigation_page')]/span[1] Breadcrumb 2 //span[contains(@class,'navigation_page')]/span[3] Negritas //p[contains(@class,'text-justify')]/strong/text() Haz pruebas con fichas y categorías de: https://www.atmosferasport.es
  53. 53. #SEOnderground @mjcachon Custom Extraction Screaming Frog
  54. 54. #SEOnderground @mjcachon Custom Extraction Screaming Frog
  55. 55. #SEOnderground @mjcachon Analicemos a fondo el stock, los precios o la riqueza de las fichas
  56. 56. #SEOnderground @mjcachon ¿Dónde hay más stock? 84% 13% 2% 1% Secciones con más productos Marcas Deportes Rebajas 2021 deporte Accesorios
  57. 57. #SEOnderground @mjcachon ¿Dónde hay más stock? 26,03% 5,97% 5,60% 4,80% 4,48% 3,57% 2,61% 1,92% 1,87% 1,76% 1,55% 1,28% 1,12% 1,01% 0,75% 0,27% 0,00% 5,00% 10,00% 15,00% 20,00% 25,00% 30,00% Nike adidas PUMA Asics New Balance Reebok Under Armour Skechers Converse Salomon Joluvi MUNICH Vans Mizuno New Era Brooks Marcas con más Stock 11,95% 4,21% 3,79% 2,45% 2,19% 1,76% 1,55% 1,55% 1,44% 1,17% 0,96% 0,85% 0,75% 0,48% 0,16% 0,11% 0,05% 0,00% 2,00% 4,00% 6,00% 8,00% 10,00% 12,00% 14,00% Casual Montaña Fútbol Fitness Running Natación Tenis Pádel Trekking y Senderismo Ciclismo Fútbol Sala Training Trail Baloncesto Acampada Voleibol Danza Deportes con más Stock
  58. 58. #SEOnderground @mjcachon ¿Dónde hay más descuento? 76% 22% 1% 1% Secciones con más descuento Marcas Deportes Moda deportiva para hombre Moda deportiva para mujer
  59. 59. #SEOnderground @mjcachon ¿Dónde hay más descuento? 14,13% 12,38% 11,83% 5,60% 4,52% 2,41% 2,34% 1,49% 1,09% 0,96% 0,88% 0,73% 0,61% 0,37% 0,27% 0,13% 0,08% 0,00% 2,00% 4,00% 6,00% 8,00% 10,00% 12,00% 14,00% 16,00% Casual Fitness Fútbol Running Montaña Pádel Fútbol Sala Tenis Training Ciclismo Natación Trekking y… Trail Acampada Baloncesto Danza Voleibol Deportes con más descuento 17,00% 4,92% 3,80% 2,60% 2,55% 2,36% 1,66% 1,13% 1,11% 1,07% 1,04% 0,70% 0,11% 0,09% 0,07% 0,00% 0,00% 2,00% 4,00% 6,00% 8,00% 10,00% 12,00% 14,00% 16,00% 18,00% Nike adidas New Balance Asics PUMA Mizuno Salomon Converse Under… Skechers MUNICH Reebok Joluvi Vans New Era Brooks Marcas con más descuento
  60. 60. #SEOnderground @mjcachon QA Fichas de producto Sección Nº productos Sección Nº productos Sin migas de pan (breadcrumbs)
  61. 61. #SEOnderground @mjcachon QA Fichas de producto Promedio de Imágenes y texto en las fichas
  62. 62. #SEOnderground @mjcachon Fichas de producto Gama de colores de cada producto
  63. 63. #SEOnderground @mjcachon Y esto es todo…
  64. 64. #SEOnderground @mjcachon GRACIAS somos@laikateam.com
  65. 65. #SEOnderground @mjcachon Recursos y referencias 1. https://zeo.org/blog/xpath-seo-scraping-data-in-screaming-frog-by-using-xpath-basic- commands/ 2. https://devhints.io/xpath#string-functions 3. https://www.mclibre.org/consultar/xml/lecciones/xml-xpath.html 4. https://www.w3schools.com/xml/xpath_intro.asp 5. https://willmanntobias.medium.com/a-101-how-to-use-screaming-frog-seo-spider-to-find-all- article-outlinks-on-a-section-page-c0db4c87edd5 6. https://www.screamingfrog.co.uk/how-to-use-custom-search/ 7. https://builtvisible.com/seo-guide-to-xpath/ 8. https://salt.agency/blog/an-introduction-to-using-xpath-extractions-for-seo/ 9. https://www.screamingfrog.co.uk/web-scraping/#xpath-examples 10.https://www.seerinteractive.com/blog/screaming-frog-guide/ 11.https://www.zyte.com/blog/an-introduction-to-xpath-with-examples/

×