-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3983 from tecfer/main
Reto #18 - Python
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
''' | ||
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. | ||
''' | ||
#pip install beautifulsoup4 | ||
#pip install lxml | ||
|
||
import requests | ||
from bs4 import BeautifulSoup | ||
|
||
soup = BeautifulSoup(requests.get('https://holamundo.day/').content, 'lxml') | ||
|
||
elementos = soup.find_all('blockquote') | ||
for elemento in elementos[21:]: | ||
print(elemento.get_text()) | ||
|