public static void GetHome() { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 1; int end = 100; //track counter: id="post-5740" for (int i = start; i < end; i++) { try { var doc = web.Load("http://photo.hoanvu.net"); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//div[@id = 'container']"); if (divContainer == null) { continue; } foreach (HtmlNode node in divContainer.ChildNodes) { if (node != null && node.Name == "div") { try { string strCounter = node.Attributes["id"].Value; if (strCounter != "post-tags") { bool bDownloaded = bolService.CheckLinkDownloaded("photo.hoanvu.net", strCounter); if (!bDownloaded && node.HasChildNodes) { HtmlNode nodeDiv = node.SelectSingleNode("//div[@class = 'post-thumbnail']"); HtmlNode nodea = nodeDiv.SelectSingleNode("//a[@class = 'img']"); string strTitle = nodea.Attributes["title"].Value; string strPage = nodea.Attributes["href"].Value; //TODO: call function Get Images SaveImageOnePage(strPage, strCounter, "bikini-girl", strTitle); } } } catch (Exception e) { Console.WriteLine(e.ToString()); } } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish GetBikiniGirl ^_^"); }
public static void HotGirl() { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 1; int end = 2; //TODO: max value 5; //track counter: id="post-5740" for (int i = start; i < end; i++) { try { var doc = web.Load("http://tructiepso.com/category/hot-girl/page/" + i); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//div[@class = 'nag cf']"); if (divContainer == null) { continue; } HtmlNodeCollection linkPage = divContainer.SelectNodes("//a[@class = 'clip-link']"); if (linkPage == null) { continue; } foreach (HtmlNode node in linkPage) { try { string strCounter = node.Attributes["data-id"].Value; bool bDownloaded = bolService.CheckLinkDownloaded("tructiepso.com", strCounter); if (!bDownloaded) { string strTitle = node.Attributes["title"].Value; string strPage = node.Attributes["href"].Value; //TODO: call function Get Images TestImageOnePage(strPage, strCounter, "Hot-Girl", strTitle); } } catch (Exception e) { Console.WriteLine(e.ToString()); } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish GetBikiniGirl ^_^"); }
public static void Bikini() { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 1; int end = 3; //TODO: Current max 9; //track counter: id="post-5740" for (int i = start; i < end; i++) { try { var doc = web.Load("http://xinhvl.com/channels/bikini-xinh/?page=" + i); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//div[@id = 'xinhVLListBit']"); if (divContainer == null) { continue; } foreach (HtmlNode htmlNode in divContainer.ChildNodes) { if (htmlNode.Name.Equals("div")) { foreach (HtmlNode childNode in htmlNode.ChildNodes) { if (childNode.Name.Equals("a")) { string strPage = childNode.Attributes["href"].Value; string strCounter = BuildCounter(strPage); string strTitle = childNode.NextSibling.NextSibling.InnerText; bool bDownloaded = bolService.CheckLinkDownloaded("xinhvl.com", strCounter); if (!bDownloaded) { //TODO: call function Get Images TestImageOnePage(strPage, strCounter, "bikini", strTitle); } break; } } } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish Bikini ^_^"); }
public static void Bikini_Chau_A() { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 0; int end = 44; //TODO: current max value 39 //track counter: id="post-5740" for (int i = end; i > start; i--) { try { var doc = web.Load("http://phunuvn.net/forums/anh-girl-xinh-bikini-chau-a.9/page-" + i); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//ol[@class = 'discussionListItems']"); if (divContainer == null) { continue; } foreach (HtmlNode htmlNode in divContainer.ChildNodes) { if (htmlNode.Name.Equals("li") && htmlNode.Attributes["id"] != null) { string strClass = htmlNode.Attributes["id"].Value; string strCounter = strClass.Replace("thread-", ""); if (strClass.Contains("thread-")) { bool bDownloaded = bolService.CheckLinkDownloaded("phunuvn.net", strCounter); if (!bDownloaded) { foreach (HtmlNode node in htmlNode.ChildNodes) { if (node.Name.Equals("div") && node.Attributes["class"] != null && node.Attributes["class"].Value == "listBlock main") { HtmlNode nodeTitle = node.ChildNodes.FirstOrDefault(o => o.Name == "div" && o.HasAttributes && o.Attributes["class"].Value == "titleText"); if (nodeTitle != null && nodeTitle.HasChildNodes) { HtmlNode nodeh3 = nodeTitle.ChildNodes.FirstOrDefault(o => o.Name == "h3" && o.HasAttributes && o.Attributes["class"].Value == "title"); if (nodeh3 != null && nodeh3.HasChildNodes) { HtmlNode nodeLink = nodeh3.ChildNodes.FirstOrDefault(o => o.Name == "a" && o.HasAttributes && o.Attributes["class"].Value == "PreviewTooltip"); string strTitle = nodeLink.InnerText; string strPage = string.Format("http://phunuvn.net/{0}", nodeLink.Attributes["href"].Value); //TODO: call function Get Images TestImageOnePage(strPage, strCounter, "Bikini-Chau-A", strTitle); break; } } } } } } } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish Bikini_VietNam ^_^"); }
public static void SexyGirl() { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 1; int end = 3; //TODO: current max value 36 //track counter: id="post-5740" for (int i = start; i < end; i++) { try { var doc = web.Load("http://xemlasuong.org/anh/page/" + i); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//div[@class = 'items-container items-container-blog']"); if (divContainer == null) { continue; } foreach (HtmlNode htmlNode in divContainer.ChildNodes) { if (htmlNode.Name.Equals("div") && htmlNode.Attributes["class"] != null) { string strClass = htmlNode.Attributes["class"].Value; if (strClass.Equals("items-container-responsive")) { foreach (HtmlNode node in htmlNode.ChildNodes) { if (node.Name.Equals("div")) { string strID = node.Attributes["id"].Value; foreach (HtmlNode childNode in node.ChildNodes) { if (childNode.Name.Equals("a")) { string strPage = childNode.Attributes["href"].Value; string strCounter = strID; string strTitle = BuildCounter(strPage); bool bDownloaded = bolService.CheckLinkDownloaded("xemlasuong.org", strCounter); if (!bDownloaded) { //TODO: call function Get Images TestImageOnePage(strPage, strCounter, "sexy-girl", strTitle); } break; } } } } break; } } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish sexy-girl ^_^"); }
public static void Daily_AnhGirlXinh(string strHost) { var bolService = new BOLService.BOLService(); List <ImgLink> lst = new List <ImgLink>(); var web = new HtmlWeb(); int start = 1; int end = 5; //TODO: Current max 9; //track counter: id="post-5740" for (int i = start; i < end; i++) { try { //strHost = http://www.xemanh.net/category/anh-girl-xinh/page/ string strURL = strHost + "/" + i; Console.WriteLine(i + " : " + strURL); var doc = web.Load(strURL); //TODO: Check valid URL var divContainer = doc.DocumentNode.SelectSingleNode("//div[@id = 'main']"); if (divContainer == null) { continue; } foreach (HtmlNode htmlNode in divContainer.ChildNodes) { try { if (htmlNode.Name.Equals("article")) { foreach (HtmlNode childNode in htmlNode.ChildNodes) { if (childNode.Name.Equals("a") && childNode.Attributes["class"] != null && childNode.Attributes["class"].Value == "home-thumb") { string strPage = childNode.Attributes["href"].Value; string strCounter = htmlNode.Id; string strTitle = childNode.Attributes["title"].Value; bool bDownloaded = bolService.CheckLinkDownloaded("xemanh.net", strCounter); if (!bDownloaded) { //TODO: call function Get Images TestImageOnePage(strPage, strCounter, "anh-girl-xinh", strTitle); } break; } } } } catch (Exception exceptionArticle) { Console.WriteLine(exceptionArticle.ToString()); } } } catch (Exception exception) { //log4net.Config.XmlConfigurator.Configure(); //log.Info("Error: " + exception); Console.WriteLine(exception.ToString()); } } Console.WriteLine("Finish AnhGirlXinh ^_^"); }