Hey! I think that FormRequest is using the first form on the page (that text field from the top). You can tell FormRequest to use the second form through an xpath expression, like this:
fr = FormRequest.from_response(response, formdata={'RdoTimeLimit': '42'}, dont_filter=True, formxpath="(//form)[2]") On Thu, Dec 24, 2015 at 11:13 AM, Mario <laki-paki-suman...@hotmail.com> wrote: > Hi guys, > > Here’s what I’m trying to accomplish: > > [image: ss] > > This is url: http://www.eplanning.ie/CarlowCC/SearchListing/RECEIVED > > Step 1(from image): Select 42 days instead of 7 days default. > > Step 2(from image): Click on search button for results. > > I realize that this is possible with Selenium but I’m almost certain that > this can be done with Scrapy by setting proper form/s. > > I’ve tried mimicking calls in scrapy shell, here’s just one of many calls > that I used for selecting 42 days limit: > > scrapy shell 'http://www.eplanning.ie/CarlowCC/SearchListing/RECEIVED' > > from scrapy.http import FormRequest > > fr = FormRequest.from_response(response, > formdata={'RdoTimeLimit': '42'}, > dont_filter=True) > > fetch(fr) > > view(response) > > Here’s the output: > > [image: ss] > > Thanks in advance for any help, and merry Christmas everybody! > > > -- > You received this message because you are subscribed to the Google Groups > "scrapy-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scrapy-users+unsubscr...@googlegroups.com. > To post to this group, send email to scrapy-users@googlegroups.com. > Visit this group at https://groups.google.com/group/scrapy-users. > For more options, visit https://groups.google.com/d/optout. > -- [image: Scrapinghub] <https://scrapinghub.com> Valdir Stumm Junior Developer Evangelist, Scrapinghub [image: Skype]stummjr[image: Twitter] <https://twitter.com/stummjr>[image: Github] <https://github.com/stummjr>[image: Twitter] <https://twitter.com/scrapinghub>[image: LinkedIn] <https://www.linkedin.com/company/scrapinghub>[image: Github] <https://github.com/scrapinghub> *We turn web content into structured data. Lead maintainers of Scrapy <http://scrapy.org>.* -- You received this message because you are subscribed to the Google Groups "scrapy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to scrapy-users+unsubscr...@googlegroups.com. To post to this group, send email to scrapy-users@googlegroups.com. Visit this group at https://groups.google.com/group/scrapy-users. For more options, visit https://groups.google.com/d/optout.