Friends, I'm working on a scraping project. At some point, I get a table on the screen in the form of a giant string, something like this:
list = ('0004434-48.2010 \ n UNION \ n (30 business days) 07/07/2017 \ n 13/07/2017 \ n 0008767-77.2013 \ n 2017 \ n (10 business days) / 2017 \ n 13/07/2017).
I dealt with this by giving a "split" command, having the "\ n" parameter, which made the list look like this:
list = ['0004434-48.2010', 'UNION', '(30 working days) 03/07/2017', '13 / 07/2017 ',' 0008767-77.2013 ',' 2017 ',' (10 business days) 03/07/2017 ', '13 / 07/2017']
Now my difficulty is: the first item in the list is the reference number of the table row. It identifies a particular contract, which goes up to the item that contains the second date. Next comes ANOTHER line (another contract) and subsequent items will belong to this second contract.
Doubt: how can I separate this? Because I will still deal with the date, the contracts will only be "clicked" under certain conditions. I tried to make a loop like this:
for x in range(len(lista)):
if len(lista[x]) == 15: #identificar o processo
organizaProcessos.append(lista[x])