Esempio n. 1
0
        public async Task <Hitomi> HitomiData2()
        {
            url = $"https://ltn.hitomi.la/galleryblock/{index}.html";
            Hitomi h = await HitomiData();

            url = $"https://ltn.hitomi.la/galleries/{index}.js";
            JObject info = await HitomiGalleryInfo();

            h.type  = Hitomi.Type.Hitomi;
            h.tags  = HitomiTags(info);
            h.files = HitomiFiles(info).ToArray();
            h.page  = h.files.Length;
            h.thumb = ImageProcessor.LoadWebImage("https:" + h.thumbpath);
            h.Json  = info;
            return(await HitomiGalleryData(h));
        }
Esempio n. 2
0
        public Hitomi HiyobiParse(JToken item)
        {
            Hitomi h = new Hitomi();

            h.authors  = item["artists"].Select(x => x.StringValue("display")).ToArray();
            h.id       = item.StringValue("id");
            h.language = item.StringValue("language");
            h.tags     = item["tags"].Select(x => new Tag {
                name = x.StringValue("display"), types = Tag.ParseTypes(x.StringValue("value"))
            }).ToList();
            h.name       = item.StringValue("title");
            h.designType = DesignTypeFromString(item.StringValue("type"));
            h.thumbpath  = $"https://cdn.hiyobi.me/tn/{h.id}.jpg";
            h.thumb      = ImageProcessor.LoadWebImage(h.thumbpath);
            h.dir        = $"https://hiyobi.me/reader/{h.id}";
            h.page       = 0;
            h.AutoAuthor();
            return(h);
        }