Writing scraper for Windows Phone 7

Topics: Developer Forum
May 27, 2013 at 8:34 PM
I am using HtmlAgilityPack for Windows Phone 7.1 and next code is working great:
public MainPage()
{
    InitializeComponent();
    HtmlWeb.LoadAsync("http://www.xkcd.com", DownLoadCompleted);
}

void DownLoadCompleted(object sender, HtmlDocumentLoadCompleted e)
{
    if(e.Error == null)
    {
         HtmlDocument doc = e.Document;
         if (doc != null)
         {
              //Start scraping
              var imagediv = (from imgnode in doc.DocumentNode.Descendants()
              where imgnode.Name == "div" && imgnode.Attributes["id"].Value == "comic" select imgnode).FirstOrDefault();

              if (imagediv != null)
              {
                 //On to the next step
                 var imgurl = imagediv.Element("img").Attributes["src"].Value;
                 //MessageBox.Show(imgurl);
                 jokeimg.Source = new BitmapImage(new Uri(imgurl));
               }


               //Alternative to get url : no faultdetection

               string imgurlhard =
                        doc.DocumentNode.Element("html").
                            Element("body").
                            Elements("div").ElementAt(1).
                            Elements("div").ElementAt(1).
                            Element("img").Attributes["src"].Value;

                    MessageBox.Show(imgurlhard);


                }
            }
}
But when I want to display a picture from this page: http://ina.hr/ (the biggest picture from that site), I am getting black screen with no results. I was trying to customize C# code for those HTML nodes but with no success. Can anyone explain me what sould I look in order to customize it right, so I can display that picture?