C# – How to i screen-scrape a webmail page

cscreen-scraping

I am doing a project, in which i need to login into a site and scrape the webpage contents. i tried the following code:

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);
}

This scrapes the login page of the mail . But i need to scrape my inbox details. Please instruct me on how to proceed further, thanks in advance.

Best Answer

Please see this questions and the related questions. We have to study the HTML source of a webpage before we can scrap it properly. So login manually and get the source of the inbox page and then study it to scrape it.

Why dont you use yahoo's webmail API? Which is a better solution.