1
Friends, I am working on a scraping project. At some point, I capture a table on the screen in the shape of a giant string, more or less like this:
list = ('0004434-48.2010 n EU n (30 working days) 03/07/2017 n 13/07/2017 n 0008767-77.2013 n 2017 n (10 working days) 03/07/2017 n 13/07/2017).
I dealt with this by giving a command "split", having as parameter the " n", 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 working days) 03/07/2017', '13/07/2017']
Now my difficulty is: the first item on the list is the table row reference number. It identifies a particular contract, which goes to the item containing the second date. Next comes ANOTHER line (other contract) and subsequent items will belong to this second contract.
Doubt: how can I separate it? Because I will still treat the date, contracts will only be "clicked" within certain conditions. I tried to put together a noose like this:
for x in range(len(lista)):
if len(lista[x]) == 15: #identificar o processo
organizaProcessos.append(lista[x])
But so I create a list of processes, without their corresponding items, and when I try to nest another list within the variable "organizaProcesses", it doesn’t work...
Buddy, I owe you some money now! kkkkkkkkkkkkk Thanks again!
– Bergo de Almeida
Ahahah! Good to know I’m helping. Consider giving the acceptance and upvote. :-)
– Sidon