[ESP-ENG] Obtenga titulos y enlaces de de ycombinator || Get titles and links from ycombinator

avatar

preview.png

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

Saludos Hivers. Les presento un script para obtener los enlaces de un sitio web de una aceleradora de emprendimientos, https://news.ycombinator.com/. Y Combinator fundo su proyecto en marzo del 2005 para hacer crecer empresas del sector tecnológico. Ha logrado financiar más de 3000 compañias entre ellas coinbase, dropbox, airbnb y twitch. el sitio web de noticias de ycombinator funciona como un agregador de noticias, lo que significa que reúne información de diferentes sitios de internet relacionados con el campo de la tecnológica, ciencia y empresas.

Les dejo el script y su respectivo resultado abierto a su disposición para que puedan echar un vistazo este sitio de internet al cual tiene una excelente trayectoria en cuanto al apoyo de startups.

Este script fue ejecutado con Python 3.9.2 en el sistema operativo Debian Bullseye.

Greetings Hivers. I present to you a script to get the links to a website of a startup accelerator, https://news.ycombinator.com/. Y Combinator founded its project in March 2005 to grow companies in the technology sector. It has managed to fund more than 3000 companies including coinbase, dropbox, airbnb and twitch. ycombinator news website works as a news aggregator, which means that it gathers information from different internet sites related to the field of technology, science and business.

I leave the script and its respective open result at your disposal so you can take a look at this website which has an excellent track record in terms of supporting startups.

This script was executed with Python 3.9.2 on Debian Bullseye operating system.

import httpx
from selectolax.parser import HTMLParser

headers={'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 RuxitSynthetic/1.0 v8809747757102018443 t8093092299234304605 ath2653ab72 altpriv cvcv=2 smf=0'}

client=httpx.Client()
ycombinator=client.get('https://news.ycombinator.com',headers=headers).text
page=HTMLParser(ycombinator)

for data in page.css('a.titlelink'):

titles=data.text()
links=data.attributes['href']

print(f'titles:{titles} links: {links}')

Result.png


Text translated by DeepL



0 comments