예제 #1
0
 public string ProvideUrl(NovelInfo novelInfo)
 {
     if (String.IsNullOrEmpty(novelInfo.Getchu))
     {
         throw new ArgumentException("NovelInfo contains no getchu key");
     }
     return string.Format(UrlPattern, novelInfo.Gyutto);
 }
예제 #2
0
 private NovelInfo GetNovelInfoFromTableRow(HtmlNode node)
 {
     var novelInfo=new NovelInfo();
     var rows = node.Descendants("td").ToArray();
     novelInfo.ErogamescapeId = Int32.Parse(rows[0].InnerText);
     novelInfo.JapName = rows[1].InnerText;
     novelInfo.ReleaseDate = String.IsNullOrEmpty(rows[3].InnerText) ? (DateTime?)null : DateTime.Parse(rows[3].InnerText);
     novelInfo.Getchu= String.IsNullOrEmpty(rows[14].InnerText)?null:rows[14].InnerText;
     novelInfo.Site = String.IsNullOrEmpty(rows[15].InnerText) ? null : rows[15].InnerText;
     novelInfo.Galge= String.IsNullOrEmpty(rows[19].InnerText) ? null : rows[19].InnerText;
     novelInfo.Gyutto= String.IsNullOrEmpty(rows[26].InnerText) ? null : rows[26].InnerText;
     novelInfo.Dmm = String.IsNullOrEmpty(rows[27].InnerText) ? null : rows[27].InnerText;
     novelInfo.DmmType = String.IsNullOrEmpty(rows[28].InnerText) ? null : rows[28].InnerText;
     novelInfo.DmmGenre = String.IsNullOrEmpty(rows[29].InnerText) ? null : rows[29].InnerText;
     novelInfo.DlSiteId = String.IsNullOrEmpty(rows[33].InnerText) ? null : rows[33].InnerText;
     novelInfo.DlSiteDomain = String.IsNullOrEmpty(rows[34].InnerText) ? null : rows[34].InnerText;
     return novelInfo;
 }