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

avatar

Preview.pngImagen diseñada con canva || Image designed with canva

Saludos hivers. Traigo un simple script elaborado en Python para obtener los enlaces y títulos del sitio web technologynetworks.

Si quieres estar enterado sobre los acontecimientos más recientes sobre ciencia y tecnología este sitio web cumple con ese objetivo.

En technologynetworks encontraremos investigaciones, infografías, seminarios, videos, podcasts, revisas y libros que ocupan temas mayormente sobre ciencia, que además cuenta con más de 14 millones de visitas anuales para estar informado sobre las publicaciones que ofrece este sitio web.

Cuenta con una interfaz muy simple, libre de distracciones y las publicaciones están orientas con un estilo de redacción legible para todo público, sin despreciar o descuidar los detalles técnicos característicos de las publicaciones de carácter científico.

Para mí es un sitio web de reciente descubrimiento gracias mi aprendizaje autodidáctico sobre webscripting por suerte lo encuentre.

Pero bueno, les dejaré el enlace al sitio web, el script y sus resultados para que puedan disponer de estos elementos y elaborar sus propias conclusiones.

Espero que esta lectura le resulta gratificante. Gracias por visitar. Hasta la próxima entrega.

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

Greetings hivers. I bring a simple script elaborated in Python to get the links and titles from the website technologynetworks.

If you want to be aware of the latest developments in science and technology this website fulfills that goal.

In technologynetworks we will find research, infographics, seminars, videos, podcasts, reviews and books that deal with topics mostly about science, which also has more than 14 million annual visits to be informed about the publications offered by this website.

It has a very simple interface, free of distractions and publications are oriented with a writing style readable for all audiences, without disregarding or neglecting the technical details characteristic of scientific publications.

For me it is a website of recent discovery thanks to my self-taught learning about webscripting, luckily I found it.

But well, I will leave you the link to the website, the script and its results so that you can have these elements at your disposal and draw your own conclusions.

I hope you find this a rewarding read. Thanks for visiting. Until the next installment.

This script was run with Python 3.9.13 on the Lubuntu 18.0.4 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'}

client=httpx.Client()
technologynetworks=client.get('https://www.technologynetworks.com/tn/news',headers=headers).text
technologynetworks_raw=HTMLParser(technologynetworks)

for l,h in zip(technologynetworks_raw.css('a.cards_rectangle_image_left'),technologynetworks_raw.css('div.cards_title > h2')):

l=l.attributes['href']
h=h.text(strip=True)

print(f'links: {l} headlines: {h}')

Result.png


Text translated by DeepL



0 comments