Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Este scraping agarra todos los docentes de www.cs.umss.edu.bo y los pone en una lista
import requests
from bs4 import BeautifulSoup
response = requests.get('http://www.cs.umss.edu.bo/rep_docentes.jsp')
soup = BeautifulSoup(response.text, "lxml")
td_docentes = soup.findAll('td', {'class': 'letra_central', 'width': '65%'})
docentes = []
for row in soup.findAll('td', {'class': 'letra_central', 'width': '65%'}):
for col in row.find_all('a'):
docentes.append(row.get_text())
title = 'Docentes'
print title
print '=' * len(title) + '\n'
for docente in docentes:
print('Docente: ' + (docente.strip()).rstrip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment