Hola lector de mi blog. En esta oportunidad te presento otro script elaborado con Python que puede utilizar para obtener los títulos y enlaces del sitio web computerweekly.
Este no es más que otro sitio web que se caracteriza por publicar noticias sobre las novedades recientes sobre el sector tecnológico. También brinda cobertura informativa para profesionales de las TI sobre hardware, seguridad informática, robótica, data center, software administrativos y servicios empresariales en línea.
Vale resaltar que la marca de este sitio web, empezó en el año 1966 a compartir información por medio de periódicos o boletines. Hoy en día se ha convertido en uno de los sitios más populares para profesionales conocedores de la tecnología en Europa. Dispone de transmisiones en vivo en línea y pódcast donde realizar entrevistas a profesionales notables del sector.
Bueno mi querido lector, espero que este sitio web te resulte útil y también el script. Más abajo encontrarán el script con su resultado.
Agradezco que hayas visito mi perfil y te toparas con esta publicación. No olvide dejar comentarios, estaré atento en atenderlo.
Este script fue ejecutado con Python 3.9.13 en el sistema operativo Lubuntu 18.0.4.
Hello reader of my blog. In this opportunity I present you another script made with Python that you can use to obtain the titles and links of the website computerweekly.
This is just another website that is characterized by publishing news about recent developments in the technology sector. It also provides information coverage for IT professionals on hardware, computer security, robotics, data centers, back-office software and online business services.
It is worth noting that this website brand started in 1966 to share information through newspapers or newsletters. Today it has become one of the most popular sites for tech-savvy professionals in Europe. It has live online broadcasts and podcasts where you can conduct interviews with notable professionals in the industry.
Well my dear reader, I hope you find this website useful and also the script. Below you will find the script with its result.
I appreciate that you visited my profile and came across this publication. Don't forget to leave comments, I will be attentive to attend you.
This script was run with Python 3.9.13 on the Lubuntu 18.0.4 operating system.
import httpx
from selectolax.parser import HTMLParserheaders={'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_pages in range(1,6):
client=httpx.Client() computerweekly=client.get(f'https://www.computerweekly.com/news/page/{index_pages}',headers=headers).text computerweekly_html=HTMLParser(computerweekly) for hl in computerweekly_html.css('h3 > a'): print(f"Titles: {hl.text(strip=True)},Links: {hl.attrs['href']}")