I need to extract all the names of people on this site:
I wrote this code in Python3:
from urllib.request import urlopen
from bs4 import BeautifulSoup
import urllib.request, urllib.parse, urllib.error
emendas = urlopen("http://www.camara.gov.br/proposicoesWeb/prop_emendas?idProposicao=2122076&subst=0")
bsObje = BeautifulSoup(emendas, "lxml")
tabelas = bsObje.findAll("tbody", {"class":"coresAlternadas"})
deputados = []
for linha in tabelas:
deputados.append(linha.select('td')[3].text.strip())
print(deputados)
Resultado -> ['Laura Carneiro', 'André Figueiredo']
It did not work. Please, does anyone know how I can get all the names in order?