protected override List <SpiderProxyUriEntity> GetProxyEntities(HtmlDocument htmlDocument) { HtmlNodeCollection rows = htmlDocument.DocumentNode.SelectNodes("//tbody/tr"); if (rows.IsNullOrEmpty()) { return(null); } var entities = new List <SpiderProxyUriEntity>(rows.Count); foreach (var row in rows) { var entity = CreateProxyEntity(row); if (entity != null) { entities.Add(entity); } } return(entities); }
protected override List <SpiderProxyUriEntity> GetProxyEntities(HtmlDocument htmlDocument) { HtmlNodeCollection rows = htmlDocument.DocumentNode.SelectNodes("//table//tr"); if (rows.IsNullOrEmpty()) { return(null); } var entities = new List <SpiderProxyUriEntity>(rows.Count - 1); for (int i = 1; i < rows.Count; i++) //Skip the columns. { var entity = CreateProxyEntity(rows[i]); if (entity != null) { entities.Add(entity); } } return(entities); }
protected bool IsNullOrEmpty(HtmlNodeCollection collection, string name) { return(collection.IsNullOrEmpty(Logger, name, ID)); }