Hola querido lector de mi blog. Hoy vuelvo con más script para ti. Esta vez lo he creado para que puedas usarlo en el sitio web testdriven. Un sitio web que a mi parecer tiene mucho que ofrecer, ya que es muy completo en cuanto se refiere al desarrollo web usando Python con el criterio de informarte sobre desarrollo basado en pruebas, diseño de microservicios y operaciones TI. Su principal lema es:
"Enseñar programación práctica a través de aplicaciones del mundo real." Así puedes tendrás acceso a unos recursos,como dije al principio, valiosos y prácticos que te ayudaran a un comprender el funcionamiento y aplicación de proyectos basado en la nube: deploy de aplicaciones Flask o Django, frameworks populares para sitios web, creación de API y CRUD.
Todo esto y más tiene para ofrecer este sitio web, el cual tambien tienes acceso a material didáctico y acceso a cursos de pago que puedes optar para aprender o mejorar tus desarrollados.
Espero que esta publicación sea útil para ti y que puedas considerarlo para referencias o simplemente, puedes visitarlo y quizás encuentres lo que estás buscando.
Culmino hasta corta entrega. Espero volverte encontrar por aquí. Gracias por su visita.
Este script fue ejecutado con Python 3.9.13 en el sistema operativo Lubuntu 18.0.4.
Hello dear reader of my blog. Today I'm back with more script for you. This time I have created it for you to use on the testdriven website. A website that in my opinion has a lot to offer, as it is very complete in terms of web development using Python with the criteria of informing you about test-driven development, microservices design and IT operations. Its main motto is:
"Teaching practical programming through real-world applications." So you will have access to valuable and practical resources, as I said at the beginning, that will help you understand the operation and implementation of cloud-based projects: deploying Flask or Django applications, popular frameworks for websites, creating APIs and CRUD.All this and more has to offer this website, which also has access to didactic material and access to paid courses that you can opt for to learn or improve your skills.
I hope this publication is useful for you and that you can consider it for references or simply, you can visit it and maybe you will find what you are looking for.
Culmino to short delivery. I hope to meet you here again. Thank you for your visit.
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 find_pages in range(1,5):
client=httpx.Client() testdriven=client.get(f'https://testdriven.io/blog/?page={find_pages}',headers=headers).text testdriven_raw_html=HTMLParser(testdriven) for parsing_hl in testdriven_raw_html.css('article > header > h1 > a'): print(f"Titles: {parsing_hl.text(strip=True)}, Links: {parsing_hl.attrs['href']}")