public override List <Job> readJobs(string i_url) { List <Job> jobs = new List <Job>(); WebClient GodLikeClient = new WebClient(); HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument(); JobSearcher_16._11.Helpers.HttpDownloader downloader = new Helpers.HttpDownloader(i_url, null, null); document.LoadHtml(downloader.GetPage()); HtmlNodeCollection HTMLjobs = document.DocumentNode.SelectNodes("//table[@bgcolor='#B8B8B8']"); if (HTMLjobs != null) { foreach (var Hjob in HTMLjobs) { HtmlNode curnode = Hjob; Job jmJob = new Job(); HtmlNode titleHolder = curnode.SelectSingleNode("tr[@class='jobTitle']//b"); jmJob.Title = titleHolder.InnerText.ToString(); HtmlNodeCollection desceHolders = curnode.SelectNodes("tr[@bgcolor='white']//div"); StringBuilder sbDesc = new StringBuilder(); foreach (var item in desceHolders) { sbDesc.Append(" "); sbDesc.Append(item.InnerText.ToString()); } jmJob.Description = sbDesc.ToString(); HtmlNode JobID = curnode.SelectSingleNode("tr[@class='jobTitle']//div[@style='position:absolute;margin-top:4px;margin-right:-18px;']"); string altId = JobID.GetAttributeValue("id", ""); jmJob.ID = getJobID(altId); jmJob.URL = "http://www.jobmaster.co.il/code/check/checknum.asp?key=" + jmJob.ID; HtmlNode Company = curnode.SelectSingleNode("tr[@bgcolor='white']//a/u/font"); if (Company != null) { jmJob.Company = Company.InnerText; } else { jmJob.Company = "Not Available"; } jobs.Add(jmJob); } } return(jobs); }
public override List <Job> readJobs(string i_url) { List <Job> jobs = new List <Job>(); WebClient GodLikeClient = new WebClient(); HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument(); JobSearcher_16._11.Helpers.HttpDownloader downloader = new Helpers.HttpDownloader(i_url, null, null); document.LoadHtml(downloader.GetPage()); HtmlNodeCollection HTMLjobs = document.DocumentNode.SelectNodes("//div[@vocab='http://schema.org/']"); if (HTMLjobs != null) { foreach (var Hjob in HTMLjobs) { HtmlNode curnode = Hjob; Job jnJob = new Job(); HtmlNode titleHolder = curnode.SelectSingleNode("div//h2"); jnJob.Title = titleHolder.InnerText; HtmlNode Company = curnode.SelectSingleNode("div//span"); jnJob.Company = Company.InnerText; HtmlNode idHolder = curnode.SelectSingleNode("div//input"); jnJob.ID = idHolder.Attributes["value"].Value; jnJob.URL = SpecificJobURL + jnJob.ID; jnJob.Company = Company.InnerText; HtmlNodeCollection desceHolders = curnode.SelectNodes("div//i"); StringBuilder sbDesc = new StringBuilder(); foreach (var item in desceHolders) { sbDesc.Append(" "); sbDesc.Append(item.InnerText); } jnJob.Description = sbDesc.ToString(); jobs.Add(jnJob); } } return(jobs); }
public override List <Job> readJobs(string i_url) { List <Job> jobs = new List <Job>(); WebClient GodLikeClient = new WebClient(); HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument(); JobSearcher_16._11.Helpers.HttpDownloader downloader = new Helpers.HttpDownloader(i_url, null, null); document.LoadHtml(downloader.GetPage()); HtmlNodeCollection HTMLjobs = document.DocumentNode.SelectNodes("//div[@class='jobContainer']"); if (HTMLjobs != null) { foreach (var Hjob in HTMLjobs) { HtmlNode curnode = Hjob; Job DrushimJob = new Job(); HtmlNode titleHolder = curnode.SelectSingleNode("div//h2"); DrushimJob.Title = titleHolder.InnerText; HtmlNode Company = curnode.SelectSingleNode("div//span[@class='fieldTitle']"); DrushimJob.Company = Company.InnerText; HtmlNodeCollection description = curnode.SelectNodes("div/div/div[2]/span"); DrushimJob.Description = description[1].InnerText; HtmlNodeCollection experience = curnode.SelectNodes("div/div/div[3]/span"); DrushimJob.RequestedExperience = experience[1].InnerText; HtmlNode Id = curnode.SelectSingleNode("div//a"); DrushimJob.ID = Id.Attributes["jobcode"].Value; DrushimJob.URL = SpecificJobURL + DrushimJob.ID; jobs.Add(DrushimJob); } } return(jobs); }