/// <summary> /// Scraps the specified column rules. /// </summary> /// <param name="ColumnRules">The column rules.</param> /// <param name="Reduce">if set to <c>true</c> [reduce].</param> /// <returns>List<ExtractDoc>.</returns> public List <Kuto> Scrap(List <ScrapRule> ColumnRules, bool Reduce = false) { List <Kuto> ret = new List <Kuto>(); Kuto tmpDoc = new Kuto(this.ToString()); foreach (ScrapRule Rule in ColumnRules) { ret.Add(tmpDoc.Extract(Rule.startString, Rule.endString)); if (Reduce) { tmpDoc = tmpDoc.Extract(Rule.endString, ""); } } return(ret); }
/// <summary> /// Scraps the specified condition. /// </summary> /// <param name="Condition">The condition.</param> /// <param name="ColumnRules">The column rules.</param> /// <returns>List<List<ExtractDoc>>.</returns> public List <List <Kuto> > Scrap(string Condition, List <ScrapRule> ColumnRules) { List <List <Kuto> > rows = new List <List <Kuto> >(); Kuto tmpDoc = new Kuto(this.ToString()); while (tmpDoc.Contains(Condition)) { rows.Add(tmpDoc.Scrap(ColumnRules)); tmpDoc = tmpDoc.Extract(Condition, ""); } return(rows); }