-
Sep 14th, 2017, 11:52 PM
#1
Thread Starter
Addicted Member
Webbrowser Control Finding Elements
Hi,
I have this requirement. In our system we have a list of contacts, and for each of these contacts we have saved their linkedIn Profile links. Now everytime a contact changes their Company position and email we should be able to update our database without manual intervention.
This is how I designed the solution.
1. I have a windows app that runs every morning that will pull all of the data in linked in via the webbrowser control and save the results in an xml.
2. I have a batch scheduled job in salesforce that will call my webservice that will transform the xml to json format.
Problem: I can successfully navigate to my contacts profile in linked in via the web browser control but I can't seem to find the div containing the information that I need.
I tried using
Code:
var result = "";
foreach (HtmlElement el in wb.Document.GetElementsByTagName("div"))
if (el.GetAttribute("class").Contains("ember-view"))
{
result = el.InnerText;
}
else
{
result = el.InnerHtml;
}
but it does not get all the divs. Any help would be appreciated
-
Sep 15th, 2017, 12:20 AM
#2
Re: Webbrowser Control Finding Elements
It would help if you could post the HTML that you're trying to parse.
-
Sep 22nd, 2017, 01:45 AM
#3
Thread Starter
Addicted Member
Re: Webbrowser Control Finding Elements
Originally Posted by jmcilhinney
It would help if you could post the HTML that you're trying to parse.
Hi,
Sorry for the late reply. I was stuck somewhere without internet. By the way this is the link.
https://drive.google.com/file/d/0B6h...ew?usp=sharing
I need to get all data from this area.
-
Sep 22nd, 2017, 11:33 AM
#4
Re: Webbrowser Control Finding Elements
I don't know if the profile page can be crawled by bot scripts or webbrowser control. If you check the page source, the keywords Contact and Personal Info, Email, Connected and others do not exist.
- kgc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|