[ESP-ENG] Titulos y enlaces en searchengineland || Titles and links in searchengineland

in GEMS2 years ago

Preview.png

Imagen diseñada con canva || Image designed with canva

Hola lector de mi blog. Hoy traigo para ti otro script para que lo uses en el sitio web searchengineland. Este script se encarga de obtener los títulos y enlaces en diferentes índices de la página de noticias y análisis que precisamente tratan sobre temas relacionados con el SEO y el marketing digital.

searchengineland se esfuerza en traer para ti el mejor contenido de la actualidad para que no te pierdas las estrategias o técnicas que puedas adoptar en tu sitio web para optimizar tu contenido para elevar las visitas que recibe tu sitio , aumentar popularidad y entregar contenido de calidad que pueda conectar con tus lectores.

Es mucho lo que se puede hacer adoptando las prácticas del SEO y las herramientas en línea que pueden resultar útiles para mejorar el posicionamiento de tu sitio web tanto en los motores de búsqueda como en las redes sociales.

El sitio web me ha gustado mucho, es simple y muy didáctico con su contenido. Así que si estabas buscando una excelente referencia sobre SEO, has dado en clavo.

Aquí culmino esta pequeña entrega. Puedes dejar tu comentario y estaré atento en responder. Abaja tienes el código de Python. Gracias y hasta pronto.

Este script fue ejecutado con Python 3.9.13 en el sistema operativo Lubuntu 18.04.6.

Hello reader of my blog. Today I bring for you another script for you to use on the website searchengineland. This script is responsible for getting the titles and links in different indexes of the news and analysis page that precisely deal with topics related to SEO and digital marketing.

searchengineland strives to bring you the best content out there so that you don't miss out on strategies or techniques that you can adopt on your website to optimize your content to increase your site traffic, increase popularity and deliver quality content that can connect with your readers.

There is a lot that can be done by adopting SEO practices and online tools that can be useful to improve the positioning of your website both in search engines and social networks.

I really liked the website, it is simple and very didactic with its content. So if you were looking for an excellent reference on SEO, you have hit the nail on the head.

Here I culminate this little installment. You can leave your comment and I will be attentive to respond. Below you have the Python code. Thanks and see you soon.

This script was run with Python 3.9.13 on Lubuntu 18.04.6 operating system.

import httpx
from selectolax.parser import HTMLParser

headers={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75'}

for index in range(1,5):

client=httpx.Client()
searchengineland=client.get(f'https://searchengineland.com/page/{index}',headers=headers).text
searchengineland_html_page=HTMLParser(searchengineland)

for find_hl in searchengineland_html_page.css('div > h2 > a'):

    print(f"Titles: {find_hl.text(strip=True)},Links: {find_hl.attrs['href']}")

result.png


Text translated by DeepL