Skip to content

Commit

Permalink
Solución Reto mouredev#18
Browse files Browse the repository at this point in the history
  • Loading branch information
VicLG98 committed May 2, 2023
1 parent d506593 commit fa0b537
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Retos/Reto #18 - WEB SCRAPING [Difícil]/python/viclg98.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# * El día 128 del año celebramos en la comunidad el "Hola Mundo day"
# * Vamos a hacer "web scraping" sobre su sitio web: https://holamundo.day
# *
# * Crea un programa que se conecte a la web del evento e imprima únicamente la agenda de eventos
# * del día 8. Mostrando hora e información de cada uno.
# * Ejemplo: "16:00 | Bienvenida"
# *
# * Se permite utilizar librerías que nos faciliten esta tarea.

import requests
from parsel import Selector

url = "https://holamundo.day"

response = requests.get(url)

sel = Selector(response.text)

agenda = sel.css("blockquote")[-15:]
for event in agenda:
# Print each event to the console
print("".join(event.css("span::text").getall()))

0 comments on commit fa0b537

Please sign in to comment.