Hello, I'm using Scrapy
to automate a "query" process on a website.
After logging into a site, using FormRequest
, I need to make a new request
to send several process numbers to the site.
I'm currently doing this:
dados = {
'sessionName': 'PROCESSOS',
'sessionNotice': ' ',
'contracts' : '1234567'
}
yield scrapy.FormRequest(
url= LINK ,
method = 'POST',
formdata= dados,
callback = self.resposta,
)
def resposta(self,response):
print("DEU CERTO...")
Okay! This works for 1 process, the problem is that I need to send several, so I tested the following:
PROCESSOS: "12345\n54321\n132456"
And replaces instead of formdata
in the 'contracts'
field, however, the site did not recognize the contracts.
Inserting a manual query, the formdata looks like this:
Otherdata:Processesareinsertedintoatextareaandare separatedbyinsertingoneperline.
Note: I also tried to use array.
Note 2: The request does not return any errors.