How to programmatically log in to a website to screenscape?

后端 未结 5 1462
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 20:19

I need some information from a website that\'s not mine, in order to get this information I need to login to the website to gather the information, this happens through a HT

5条回答
  •  我在风中等你
    2020-11-29 20:42

    As an addition to dlambin answer It is necessary to have

    http.AllowAutoRedirect=false;
    

    Otherwise

    HttpWebResponse httpResponse = http.GetResponse() as HttpWebResponse;
    

    It will make another request to initial url and you won't be able to retrieve url2.

提交回复
热议问题