public static async Task <IList <ExtendedBookItem> > SearchBookAsync(string keyword)
        {
            var    url = new Uri(String.Format(QueryPath, WebUtility.HtmlEncode(keyword)));
            string srtext;

            using (var client = NewHttpClient())
                srtext = await client.GetStringAsync(url);
            int hl = "varg_search_data = ".Length;

            srtext = srtext.Substring(hl, srtext.Length - hl - 1);
            return(JsonArray.Parse(srtext).Select(jo => {
                var jojo = jo.GetObject();
                var paths = jojo["last_chapter_url"].GetString().Split(new char[] { '/', '.' }, StringSplitOptions.RemoveEmptyEntries);
                var book = new ExtendedBookItem {
                    Source = "dmzj",
                    SeriesId = paths[0],
                    VolumeId = paths[1],
                    Id = paths[2],
                    Title = jojo["full_name"].GetString(),
                    Subtitle = jojo["fullc_name"].GetString(),
                    CoverImageUri = jojo["image_url"].GetString(),
                    Author = jojo["author"].GetString(),
                    Description = jojo["description"].GetString(),
                    Catalogs = ParseCatalogs(jojo["types"].GetString())
                };
                return book;
            }).ToList());
        }
 private static ExtendedBookItem ParseExtentedBookItem(JsonObject j)
 {
     var book = new ExtendedBookItem();
     book.SeriesId = ((int)j.GetNamedNumber("_id")).ToString();
     book.Title = j.GetNamedString("name");
     book.CoverImageUri = j.GetNamedString("cover");
     book.Publisher = j.GetNamedString("publisher");
     book.Catalogs = j.GetNamedArray("cat").Select(value => ((BookCatalog)value.GetNumber())).ToList();
     book.Volumes = j.GetNamedArray("vols").Select((v) =>
     {
         var val = v.GetObject();
         string key = val.GetNamedString("_id");
         var value = val.GetNamedArray("chaps").Select(c => c.GetObject().GetNamedString("_id")).ToList();
         var pair = new KeyValuePair<string, List<string>>(key, value);
         return pair;
     }).ToList();
     return book;
 }
 private static ExtendedBookItem ParseSearchItem(HtmlNode li)
 {
     ExtendedBookItem book = new ExtendedBookItem();
     try
     {
         var cover = li.FirstChildClass("cover");
         book.CoverImageUri = cover.Element("img").GetAttributeValue("src", null);
         book.SeriesId = ParseIDFromBookLink(cover.GetAttributeValue("href", null));
         var info = li.FirstChildClass("info");
         book.Title = CleanText(WebUtility.HtmlDecode(info.FirstChildClass("title").InnerText));
         var desc = info.FirstChildClass("desc");
         book.Author = desc.Descendants("a").First(node => node.HasClass("author")).InnerText;
         book.Illustrator = desc.Descendants("a").First(node => node.HasClass("artist")).InnerText;
         book.Publisher = desc.Descendants("a").First(node => node.HasClass("publisher")).InnerText;
         var intro = desc.FirstChildClass("intro");
         book.Description = ParseDescription(intro);
     }
     catch (Exception excp)
     {
         throw new Exception("Parsing Error in search result item : " + excp.Message, excp);
     }
     return book;
 }