I'm scraping content off this website I start by sending a FormRequest that yields the search result based on Wim Herman's answer on my other question here
I scrape what is needed and want to move to the next page which does not consist of a url, it's triggered by JS. Here's how the html tag looks like:
<a href="javascript:__doPostBack('dgSearchResults$ctl24$ctl01','')">2</a>
I tried the following and nothing seems to work:
In [18]: fr = FormRequest.from_response(response, formdata={"__EVENTTARGET": 'dg
...: SearchResults$ctl02$ctl03'})
In [19]: fetch(fr)
2020-08-24 16:47:06 [scrapy.core.engine] DEBUG: Crawled (200) <POST https://registers.maryland.gov/RowNetWeb/Estates/frmEstateSearch2.aspx> (referer: None)
In [20]: view(response)
Out[20]: True
and this:
In [21]: fr = FormRequest.from_response(response, formdata={"__EVENTTARGET": 'dg
...: SearchResults$ctl02$ctl01'}, clickdata={'type': 'submit'})
In [22]: fetch(fr)
2020-08-24 16:50:24 [scrapy.core.engine] DEBUG: Crawled (200) <POST https://registers.maryland.gov/RowNetWeb/Estates/frmEstateSearch2.aspx> (referer: None)
In [23]: view(response)
Out[23]: True
when I view the response, it either lands me on the initial page (the one containing the initial form) or just nothing happens, the page number is still set to 1.