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

avatar

Preview.png

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

Hola lector de mi blog. En esta ocasión traigo otro sitio para ti. El sitio de hoy tiene por nombre ilounge. Fue lanzado con el propósito de ofrecer cobertura informativa sobre los productos tecnológicos de APPLE. Si, todo lo que APPLE lanzada al mercado esta sitio web lo convierte en noticia, lo que facilita para ti dedicar tiempo de búsqueda y garantizarte un contenido resumido y fácil de digerir.

Esto es todo por hoy, mi querido lector. Tengo poco que aportar. Gracias por leer esta pequeña entrega. Espero tu visita en la siguiente publicación.

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

Hello reader of my blog. This time I bring another site for you. Today's site is called ilounge. It was launched with the purpose of providing informative coverage about APPLE technology products. Yes, everything APPLE launches on the market, this website makes it news, which makes it easy for you to spend time searching and guarantees you summarized and easy to digest content.

That's all for today, my dear reader. I have little to contribute. Thank you for reading this little installment. I look forward to your visit in the next publication.

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 idx in range(1,11):

client=httpx.Client()
ilounge=client.get(f'https://www.ilounge.com/page/{idx}',headers=headers).text
ilounge_html_raw=HTMLParser(ilounge)

for find_hl in ilounge_html_raw.css("h2 > a"):

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

result.png


Text translated by DeepL



0 comments