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


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

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,5):

client=httpx.Client(headers=headers)
itsecuritycentral=client.get(f'https://itsecuritycentral.teramind.co/latest-posts/page/{idx}/').text
itsecuritycentral_html=HTMLParser(itsecuritycentral)

for hl in itsecuritycentral_html.css('div.postInfo > h3 > a'):
    
    h=hl.text(strip=True)
    l=hl.attributes['href']
    
    print(f'headlines: {h} links: {l}')

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Ecency