2 forms in the same page

45 views
Skip to first unread message

Cato Nano

unread,
May 27, 2017, 5:31:08 PM5/27/17
to scrapy-users
Hello

I have this piece of code

    def start_requests(self):
        return [FormRequest(url="http://www.blahblah",
                            formdata={'citta':'Roma'},
                            callback=self.resultList)]

but there are 2 distinct forms in my page

How do I instruct FormRequest to select the right one ?

Thanks in advance

Cato Nano

unread,
May 28, 2017, 2:57:15 AM5/28/17
to scrapy-users


Il giorno sabato 27 maggio 2017 23:31:08 UTC+2, Cato Nano ha scritto:
Hello

I have this piece of code


ok, it's

FormRequest.from_response(response, formname='...', formdata={...}, callback=self....)


Reply all
Reply to author
Forward
0 new messages