private List <TudouUrl> GetAllTudouUrlByHome(string temp) { List <TudouUrl> tds = new List <TudouUrl>(); Document doc = NSoupClient.Parse(temp); Elements items = doc.Select("div[class=showcase]").First.Select("div[class=item]"); foreach (Element item in items) { Element item1 = item.Select("h1[class=caption] a").First; String title = item1.Attr("title"); String url = item1.Attr("href"); Element item2 = item.Select("ul[class=info] li").First; String time = item2.OwnText(); TudouUrl td = new TudouUrl(url, title, time, "未知"); tds.Add(td); } return(tds); }
private List<TudouUrl> GetAllTudouUrlByHome(string temp) { List<TudouUrl> tds = new List<TudouUrl>(); Document doc = NSoupClient.Parse(temp); Elements items = doc.Select("div[class=showcase]").First.Select("div[class=item]"); foreach (Element item in items) { Element item1 = item.Select("h1[class=caption] a").First; String title = item1.Attr("title"); String url = item1.Attr("href"); Element item2 = item.Select("ul[class=info] li").First; String time = item2.OwnText(); TudouUrl td = new TudouUrl(url, title, time, "未知"); tds.Add(td); } return tds; }