Hello There, Guest!
View New Posts  |  View Today's Posts
[help]httpwebrequest/HtmlAgilityPack html parse?

  • 0 Vote(s) - 0 Average


05-04-2014, 03:55 PM #11
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
What code isn't working? You haven't shown us anything, and you also haven't told us any of the compiler warnings/errors you ran into (if any).


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲

05-05-2014, 08:30 AM #12
ѕα3єкα
Junior Member
**
Posts: 37 Threads:12 Joined: Dec 2012 Reputation: 0

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
here is whole code




I'm unable to figure out how to list all the listing at the website it only lists the first entry. It is something to do with the code I posted in my earlier post..
This post was last modified: 05-11-2014, 09:31 AM by ѕα3єкα.

05-07-2014, 11:44 AM #13
ѕα3єкα
Junior Member
**
Posts: 37 Threads:12 Joined: Dec 2012 Reputation: 0

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
can anybody help me?

05-11-2014, 01:46 AM #14
KoBE
¯\_(ツ)_/¯
******
Global Moderators
Posts: 4,862 Threads:494 Joined: Jun 2011 Reputation: 67

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
See if this helps you:

Code:
Dim site As HtmlAgilityPack.HtmlWeb = New HtmlWeb()
Dim document As HtmlAgilityPack.HtmlDocument = site.Load("http://jobsearch.naukri.com/jobs-in-delhi")

For Each table As HtmlNode In document.DocumentNode.SelectNodes("//div[@class='jRes']/a")
    Dim title As String = table.SelectNodes(".//strong")(0).InnerText
    Dim company As String = table.SelectNodes(".//dfn")(0).InnerText
    Dim location As String = table.SelectNodes(".//i")(0).InnerText
    Console.WriteLine(title)
    Console.WriteLine(company)
    Console.WriteLine(location)

Next

Your initial SelectNodes only selected the first Title because you had the id in there. Also, it was only selecting the title and not everything else because you included /strong. The adjustment I made allows you to select more.

Hope this helps.
This post was last modified: 05-11-2014, 01:46 AM by KoBE.

05-11-2014, 04:58 AM #15
ѕα3єкα
Junior Member
**
Posts: 37 Threads:12 Joined: Dec 2012 Reputation: 0

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
how can i add those items to columns in listview?

thanks alot you are the best guys on the internet with ace.

05-11-2014, 07:38 AM #16
sh@rp
Member
**
Posts: 199 Threads:11 Joined: Feb 2012 Reputation: 10

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
(05-11-2014, 04:58 AM)ѕα3єкα Wrote:  how can i add those items to columns in listview?

You have decided to let the other type lines of code for you as I can read from the beginning ??

https://www.google.fr/search?q=filling+l...view+vbnet
This post was last modified: 05-11-2014, 07:41 AM by sh@rp.

05-11-2014, 09:29 AM #17
ѕα3єкα
Junior Member
**
Posts: 37 Threads:12 Joined: Dec 2012 Reputation: 0

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
I actually managed to do it thanks alot kobe/ace and others...

but there is little errors in the output in location..

This post was last modified: 05-11-2014, 09:31 AM by ѕα3єкα.

02-22-2017, 05:25 AM #18
Caeleah
Junior Member
**
Posts: 1 Threads:0 Joined: Feb 2017 Reputation: 0

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
I am trying to parse the page and need to develop tables for row data. I have attempted to perform with so many different examples but I did not have the right result. Anyone knows how to do this activity?

02-25-2017, 05:23 PM #19
AceInfinity
Developer
*******
Administrators
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: [help]httpwebrequest/HtmlAgilityPack html parse?
There's more than one way to do it but what does the HTML look like ?


Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲
 ▲ ▲




Forum Jump:


Possibly Related Threads...
Thread Author Replies Views Last Post
Exclamation  problem multi post + httpwebrequest read ip sharokurdi 1 1,277 11-11-2016, 06:39 PM
Last Post: AceInfinity
   httpwebrequest, tunneling and the CONNECT method romalerius 2 2,599 05-21-2014, 11:58 AM
Last Post: romalerius
   DateTime Parse Lee Stevens 7 2,963 01-08-2014, 10:15 PM
Last Post: Lee Stevens
  Capture 'Type" value in page html Morpheus 14 6,243 10-13-2013, 03:26 PM
Last Post: Morpheus
  How to make httpwebrequest login facebok account in listbox DilarangMasuk 3 3,220 10-05-2013, 10:51 AM
Last Post: AceInfinity


Users browsing this thread: 1 Guest(s)