I've been trying but I cant get this to work. I know HTML is new to me but even so!
My first thought was that the site was being clever by checking if the user was using a browser or not. So I added request headers for User-Agent, Referer and Host. This didn't make any difference.
My next thought was that maybe the site needed to have the search input page sent/get/post before I attempt to POST the values for the search results page. So I added lines for this. However all I got was 401s / Access denied.
I have pasted an extract of my code at the bottom of this post.
I think we can rule out two lines of enquiry:
- The variables being sent. I checked these against what the browsers Developer Log and they match exactly (as far as I can make out!)
- The initial login to the site. I am still using the browser automation for this part so I expect that would set any cookies etc. On a related note - the site assigns a GUID/Session key (visible in the URL) for each login. (The key is used in some of the variables sent)
I am not sure what is preventing this from working.
Next idea = Is it possible that the site could be reading a cookie on each search attempt? If possible then How would I use WinHTTP & Developer Log to find the cookie & send it on each search?
Bookmarks