Click here to Skip to main content
15,880,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi guys, i want you tou ask question :) for my application i need to know how to i use htmlagilitypack so i want to get temprature data from tihs url(https://www.google.com.tr/webhp?hl=en&tab=ww&gfe_rd=cr&ei=UrWiVJGeDKuz8wf1moCQBA#hl=en&q=weather+Ankara) but the error "object reference not set to an instance of an object" Please help me for how i solve this problem

how i get data temprature data from google weather url...

This is my wrong code:
Dim webClient As New System.Net.WebClient
  Dim WebSource As String = webClient.DownloadString("https://www.google.com.tr/webhp?hl=en&tab=ww&gfe_rd=cr&ei=UrWiVJGeDKuz8wf1moCQBA#hl=en&q=weather+Ankara")

  Dim htmlDoc As New HtmlAgilityPack.HtmlDocument()
  htmlDoc.LoadHtml(WebSource)

  For Each link As HtmlNode In htmlDoc.DocumentNode.SelectNodes("//*[@id='wob_pp']")


      Label1.Text = link.InnerText
  Next
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900