public static List <string> GettingAllUrls2(string PageSource, string MustMatchString) { List <string> suburllist1 = new List <string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "2nd degree contact\","); string DataImage = string.Empty; foreach (string item in Dataconnection) { if (!item.Contains("!DOCTYPE ")) { if (item.Contains("&pid=")) { int startindex = item.IndexOf("&pid="); string start = item.Substring(startindex).Replace("&pid=", ""); int endIndex = start.IndexOf(","); string finalurl = "http://www.linkedin.com/profile/view?id=" + start.Substring(0, endIndex).Replace("\"", string.Empty); suburllist1.Add(finalurl); } } } } catch { } return(suburllist1.Distinct().ToList()); }
public static List<string> GettingAllUrls2(string PageSource, string MustMatchString) { List<string> suburllist1 = new List<string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "2nd degree contact\","); string DataImage = string.Empty; foreach (string item in Dataconnection) { if (!item.Contains("!DOCTYPE ")) { if (item.Contains("&pid=")) { int startindex = item.IndexOf("&pid="); string start = item.Substring(startindex).Replace("&pid=",""); int endIndex = start.IndexOf(","); string finalurl = "http://www.linkedin.com/profile/view?id=" + start.Substring(0, endIndex).Replace("\"", string.Empty); suburllist1.Add(finalurl); } } } } catch { } return suburllist1.Distinct().ToList(); }
public static List<string> GettingAllprname(string PageSource, string MustMatchString) { List<string> suburllist1 = new List<string>(); Dictionary<string, string> categoryDictonsry = new Dictionary<string, string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "<select id=\"cid"); string DataImage = string.Empty; string[] datacon = System.Text.RegularExpressions.Regex.Split(PageSource, "<select id=\"cid"); string[] Arr = Regex.Split(datacon[1], "</option>"); foreach (string item in Arr) { if (!item.Contains("Show All Companies")) { if (item.Contains("option value"))//(item.Contains("search/profile/person?")) { string[] category = Regex.Split(item, ">"); string catId = category[0].Replace("<option value=", "").Replace("\n", "").Replace("\"", "").Replace("/", "").Trim(); string catname = category[1]; //string value = item.Substring(item.IndexOf("<option value="), item.IndexOf("\"") - item.IndexOf("<option value=")).Trim().Replace("<option value=", "").Replace("\"", ""); string finalurl = catId + "," + catname; //categoryDict // string finalurl = item.Substring(item.IndexOf("\""), item.IndexOf(">") - item.IndexOf("\"")).Trim().Replace("class=", "").Replace("\"",""); //string finalurl1 = "http://subscriber.zoominfo.com/zoominfo/" + finalurl; suburllist1.Add(catname); if (item.Contains("<select id=\"status")) { break; } } } } } catch { } return suburllist1.Distinct().ToList(); }
public static List <string> GettingAllprname(string PageSource, string MustMatchString) { List <string> suburllist1 = new List <string>(); Dictionary <string, string> categoryDictonsry = new Dictionary <string, string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "<select id=\"cid"); string DataImage = string.Empty; string[] datacon = System.Text.RegularExpressions.Regex.Split(PageSource, "<select id=\"cid"); string[] Arr = Regex.Split(datacon[1], "</option>"); foreach (string item in Arr) { if (!item.Contains("Show All Companies")) { if (item.Contains("option value"))//(item.Contains("search/profile/person?")) { string[] category = Regex.Split(item, ">"); string catId = category[0].Replace("<option value=", "").Replace("\n", "").Replace("\"", "").Replace("/", "").Trim(); string catname = category[1]; //string value = item.Substring(item.IndexOf("<option value="), item.IndexOf("\"") - item.IndexOf("<option value=")).Trim().Replace("<option value=", "").Replace("\"", ""); string finalurl = catId + "," + catname; //categoryDict // string finalurl = item.Substring(item.IndexOf("\""), item.IndexOf(">") - item.IndexOf("\"")).Trim().Replace("class=", "").Replace("\"",""); //string finalurl1 = "http://subscriber.zoominfo.com/zoominfo/" + finalurl; suburllist1.Add(catname); if (item.Contains("<select id=\"status")) { break; } } } } } catch { } return(suburllist1.Distinct().ToList()); }
public static List<string> GettingAllUrls1_writtenBysharan(string PageSource, string MustMatchString) { List<string> suburllist1 = new List<string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "/profile/view?"); string DataImage = string.Empty; foreach (string item in Dataconnection) { if (!item.Contains("!DOCTYPE ")) { if (item.Contains("vsrp_people_res_name")) { //string finalurl = item.Substring(item.IndexOf("/profile/view?id="), item.IndexOf("url_unfollow_infl") - item.IndexOf(",\"link_nprofile_view")).Trim(); //string finalurls1 = finalurl.Substring(finalurl.IndexOf("/profile/view?id="), finalurl.IndexOf("%3Aprimary")+10 - finalurl.IndexOf("")).Trim(); //int startindex = item.IndexOf("?"); //string start = item.Substring(startindex); //int endIndex = start.IndexOf(","); string id = Utils.getBetween(item, "pid=", "&"); // string finalurl = "http://www.linkedin.com/profile/view" + start.Substring(0, endIndex).Replace("\"", string.Empty); string finalurl = "https://www.linkedin.com/profile/view?id=" + id; suburllist1.Add(finalurl); //http://www.linkedin.com?id=230385129&authType=OUT_OF_NETWORK&authToken=OWRO&locale=en_US&srchid=2732756961375079939471&srchindex=1&srchtotal=10&trk=vsrp_people_res_name&trkInfo=VSRPsearchId%3A2732756961375079939471%2CVSRPtargetId%3A230385129%2CVSRPcmpt%3Aprimary" //http://www.linkedin.com/profile/view?id=6741047&authType=OUT_OF_NETWORK&authToken=MWyZ&locale=en_US&srchid=2732758471375077875757&srchindex=1&srchtotal=55&trk=vsrp_people_res_name&trkInfo=VSRPsearchId%3A2732758471375077875757%2CVSRPtargetId%3A6741047%2CVSRPcmpt%3Aprimary } } } } catch { } return suburllist1.Distinct().ToList(); }
public static List<string> GettingAllUrls(string PageSource, string MustMatchString) { List<string> suburllist = new List<string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); StringArray datagoogle = htmlUtil.GetHyperlinkedUrls(PageSource); for (int i = 0; i < datagoogle.Length; i++) { string hreflink = datagoogle.GetString(i); if (hreflink.Contains(MustMatchString) && hreflink.Contains("goback")) { suburllist.Add(hreflink); } } return suburllist.Distinct().ToList(); }
public static List <string> GettingAllUrls(string PageSource, string MustMatchString) { List <string> suburllist = new List <string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); StringArray datagoogle = htmlUtil.GetHyperlinkedUrls(PageSource); for (int i = 0; i < datagoogle.Length; i++) { string hreflink = datagoogle.GetString(i); if (hreflink.Contains(MustMatchString)) //&& hreflink.Contains("goback")) { suburllist.Add(hreflink); } } return(suburllist.Distinct().ToList()); }
public static List <string> GettingAllUrls1_writtenBysharan(string PageSource, string MustMatchString) { List <string> suburllist1 = new List <string>(); HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); try { string[] Dataconnection = System.Text.RegularExpressions.Regex.Split(PageSource, "/profile/view?"); string DataImage = string.Empty; foreach (string item in Dataconnection) { if (!item.Contains("!DOCTYPE ")) { if (item.Contains("vsrp_people_res_name")) { //string finalurl = item.Substring(item.IndexOf("/profile/view?id="), item.IndexOf("url_unfollow_infl") - item.IndexOf(",\"link_nprofile_view")).Trim(); //string finalurls1 = finalurl.Substring(finalurl.IndexOf("/profile/view?id="), finalurl.IndexOf("%3Aprimary")+10 - finalurl.IndexOf("")).Trim(); //int startindex = item.IndexOf("?"); //string start = item.Substring(startindex); //int endIndex = start.IndexOf(","); string id = Utils.getBetween(item, "pid=", "&"); // string finalurl = "http://www.linkedin.com/profile/view" + start.Substring(0, endIndex).Replace("\"", string.Empty); string finalurl = "https://www.linkedin.com/profile/view?id=" + id; suburllist1.Add(finalurl); //http://www.linkedin.com?id=230385129&authType=OUT_OF_NETWORK&authToken=OWRO&locale=en_US&srchid=2732756961375079939471&srchindex=1&srchtotal=10&trk=vsrp_people_res_name&trkInfo=VSRPsearchId%3A2732756961375079939471%2CVSRPtargetId%3A230385129%2CVSRPcmpt%3Aprimary" //http://www.linkedin.com/profile/view?id=6741047&authType=OUT_OF_NETWORK&authToken=MWyZ&locale=en_US&srchid=2732758471375077875757&srchindex=1&srchtotal=55&trk=vsrp_people_res_name&trkInfo=VSRPsearchId%3A2732758471375077875757%2CVSRPtargetId%3A6741047%2CVSRPcmpt%3Aprimary } } } } catch { } return(suburllist1.Distinct().ToList()); }
public List<string> GettingAllUrls(string PageSource, string MustMatchString) { List<string> suburllist = new List<string>(); try { HtmlUtil htmlUtil = new HtmlUtil(); PageSource = htmlUtil.EntityDecode(PageSource); StringArray datagoogle = htmlUtil.GetHyperlinkedUrls(PageSource); for (int i = 0; i < datagoogle.Length; i++) { try { string hreflink = datagoogle.GetString(i); if (hreflink.Contains(MustMatchString) && hreflink.Contains("&authType=")) { if (hreflink.Contains("http://www.linkedin.com")) { suburllist.Add(hreflink); Log("[ " + DateTime.Now + " ] => [ URL >>> " + hreflink + " ]"); } else { suburllist.Add("http://www.linkedin.com" + hreflink); Log("[ " + DateTime.Now + " ] => [ URL >>> http://www.linkedin.com" + hreflink + " ]"); } } } catch { } } } catch { } suburllist = suburllist.Distinct().ToList(); return suburllist.Distinct().ToList(); }