Skip to content

Commit

Permalink
{WIP} Get header from each auctiations #3
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Andriolli committed May 19, 2018
1 parent ae33ae8 commit ca36c22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion comprasnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ def get_data_auctions_pages(self, data):

current_result['cidade'] = cidade
current_result['uf'] = uf
headers = [element for element in td.b.contents
if 'Código da UASG' not in element]
headers = [element.strip() for element in headers
if isinstance(element, str)]
current_result['cabecalho'] = headers

for line in str(td).split("<br/>"):

if 'digo da UASG' in line:

try:
current_result['cabecalho'] = header
codigo_da_uasg_chave = line.split(":")[0]
Expand Down

0 comments on commit ca36c22

Please sign in to comment.