我正在做一個項目,其中我需要登錄到一個網站和刮網頁內容。我試了下面的代碼:我該如何屏幕抓取網頁郵件頁面?
protected void Page_Load(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
string strUrl = "http://www.mail.yahoo.com?username=sakthivel123&password=operator&login=1";
byte[] reqHTML;
reqHTML = webClient.DownloadData(strUrl);
UTF8Encoding objUTF8 = new UTF8Encoding();
Label1.Text = objUTF8.GetString(reqHTML1);
}
這刮擦郵件的登錄頁面。但我需要刮我的收件箱的細節。請告訴我如何進一步進一步,在此先感謝。
我想雅虎!會有更嚴格的安全功能,以便簡單的查詢字符串GET不足以登錄到您的帳戶。我現在無法訪問它,但也許它使用HTTPS隧道。 – Cerebrus 2009-04-17 05:12:52