Skip to content

Commit

Permalink
Merge pull request #3312 from mjordanaam/Reto-#18
Browse files Browse the repository at this point in the history
Reto #18 - Python
  • Loading branch information
migueltortg authored May 2, 2023
2 parents 074a0ec + 35ba5ab commit 596f284
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Retos/Reto #18 - WEB SCRAPING [Difícil]/python/mjordanaam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
/*
* 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 bs4 import BeautifulSoup

url = "https://holamundo.day"

page = requests.get(url)

soup = BeautifulSoup(page.content, "html.parser")

results = soup.find_all("blockquote", class_="BlockquoteElement___StyledBlockquote-sc-1dtx4ci-0 slate-BlockquoteElement notion-quote unset-width")

dates = []

for result in results:
dates.append(result.text)


print(">_Agenda 8 de mayo | “Hola Mundo” day")

for activity in dates[19:]:
print(activity)

0 comments on commit 596f284

Please sign in to comment.