No volveré a explicar lo que ya está en el otro hilo. Puedes también leer aeripret.com/es/extraer-url… dónde explico todo.
Acabarás con una tabla con la URL original y la URL des último snapshot en https://t.co/ORlt4dS4F8.
Etapa 2: Extraer los contenidos
En este caso, dos partes nos interesan:
1. (rojo) la introducción del contenido 2. (naranja) el contenido
Ambos se puede identificar fácilmente con una clase:
Este parte se hará en Python, para guardar los contenidos en Markdown.
Se puede hacer de otra manera pero:
1. Es más complejo / lento (en mi opinión) 2. No es reproducible
Te dejo el código comentado para que se entienda la lógica.
No se pueden extraer todos los contenidos porque en algunos casos, el único snapshot de archive.org es una página que indica que el dominio ya no existe.
Obviamente, no me interesan estos casos y por eso mi lógica toma en cuenta este "problema".
Puedes abrir algunos archivos para comprobar que el contenido se haya guardado correctamente.
En mi caso, vemos que tanto el contenido como las imágenes aparecen bien.
Etapa 3: Convertir el markdown en HTML simple
Convertir nuestro Markdown en HTML simple. ¿Por qué hemos usado este formato antes entonces? Ya teníamos html 🤷♂️
Así nos aseguramos de tener HTML limpio, es decir sin clase, <div> etc...
A eso me refería por ejemplo cuando te decía que es más fácil hacerlo así que todo a mano.
Etapa 4: descargar todas las imágenes
Por defecto, las imágenes de nuestros contenidos están ahora en archive.org. Podemos descargarlas para subirlas a nuestro servidor.
Primero tenemos que obtener todas las URLs de todas las imágenes de nuestros contenidos
Y después intentamos descargarlas (tendremos que subirlas después a nuestro servidor por FTP de forma manual, pero son 5mn con FileZilla).
Etapa 5: modificación del HTML
Con las imágenes descargadas:
1. Actualizar los atributos src en el código descargado anteriormente para usar la nueva URL 2. Eliminar las imágenes que no se han podido descargar.
Entre no tener una imagen o que no cargue, ¿qué prefieres?
Aplicaremos un cambio muy similar al enlazado interno:
1. Si un contenido no se ha podido recuperar de archive.org, eliminamos los enlaces internos hacia este contenido
2. Reemplazamos los enlaces internos https://t.co/ORlt4dS4F8 por la URL real que usaremos
Siguiendo esta lógica y en poco tiempo tienes:
1. Todos los contenidos disponibles descargados (en HTML limpio) 2. Las imágenes disponibles en tu FTP o quitadas de los contenidos 3. El enlazado interno sin 404
Let's go through the most common formulas you need to master to work quicker.
Most of them can also be used in Excel, but not all of them.
1. VLOOKUP
THE formula you have to master because it allows you to merge data from different tables. Very useful to combine Search Console and Analytics data, for instance.
You have to master it.
2. FILTER
I've explained everything about this formula in a separate thread:
🕵️ How can you spy on a competitor's content strategy? 🕵️
Your strategy must never be a simple pale copy of what others are doing, but it's always a good idea to know what they are up to.
Let me show you, with a real example, how you can generate insights quickly.
Let's assume we're working in the travel industry and one of our competitors is Skyscanner.
We want to understand what they are doing on their blog and generate some insights based on the data we have at our disposal.
First step: get an exhaustive list of their URLs
This could be done through a crawl, but I'd rather get the list from a sitemap. Not always doable, but in this case, it was easy to find what I was looking for.
Content rehydration is a process that occurs when a website, built with a JavaScript framework, such as Angular or React, dynamically updates the content on a page without requiring a full-page refresh.
Why using rehydration instead of relying only on SSR? It is faster!
What is the issue with content rehydration?
It will add a script to the raw response sent by your server with all the required code to make the application dynamic. Out-of-the-box, this script can easily represent more than 90% of the total HTML size.