public override GalleryImagePath GetGalleryImagePath(GalleryImageView view, GalleryParameterValues values) { return(new GalleryImagePath() { ImageUrl = view.Url }); }
public List <GalleryImageView> GetGalleryImageViews(string url, int page) { var parameter = this.CreateRequestParameter(); parameter.Uri = url + "?p=" + page; parameter.Method = "GET"; using (var response = this.Explorer.Request(parameter)) { var gdtDivElement = response.ReadAsDocument().DocumentNode.ChildNodes["html"].ChildNodes["body"].ChildNodes.FirstOrDefault(n => n.GetAttributeValue("id", string.Empty).Equals("gdt")); var gdtmElements = gdtDivElement.ChildNodes.Where(n => n.GetAttributeValue("class", string.Empty).Equals("gdtm")); var list = new List <GalleryImageView>(); foreach (var element in gdtmElements) { var view = new GalleryImageView() { Url = element.ChildNodes["div"].ChildNodes["a"].GetAttributeValue("href", null) }; list.Add(view); } return(list); } }
public override WebRequestParameter CreateImageRequest(GalleryImageView view, GalleryImagePath path, GalleryParameterValues values) { var request = base.CreateImageRequest(view, path, values); request.Referer = Site.HitomiReader.ToUrl(this.DownloadInput); return(request); }
public virtual WebRequestParameter CreateImageRequest(GalleryImageView view, GalleryImagePath path, GalleryParameterValues values) { var parameter = this.CreateRequestParameter(); parameter.Method = "GET"; parameter.Uri = path.ImageUrl; return(parameter); }
public override WebRequestParameter CreateImageRequest(GalleryImageView view, GalleryImagePath path, GalleryParameterValues values) { var uri = new Uri(path.ImageUrl); var fileName = uri.GetFileName(); if (fileName.Equals("509.gif") == true) { throw new ImageRequestCreateException("ImageLimit"); } return(base.CreateImageRequest(view, path, values)); }
public override GalleryImagePath ReloadImagePath(GalleryImageView _view, GalleryImagePath prev, GalleryParameterValues values) { if (_view is HitomiGalleryImageView view) { this.InstallLtn(); var newView = this.GetGalleryImageView(view.ImageFile); return(this.GetGalleryImagePath(newView, values)); } else { throw new NotImplementedException(); } }
public virtual void Validate(GalleryImageView view, GalleryImagePath path, GalleryParameterValues values, byte[] bytes) { }
public abstract GalleryImagePath ReloadImagePath(GalleryImageView view, GalleryImagePath prev, GalleryParameterValues values);
public abstract GalleryImagePath GetGalleryImagePath(GalleryImageView view, GalleryParameterValues values);
public override GalleryImagePath ReloadImagePath(GalleryImageView view, GalleryImagePath prev, GalleryParameterValues values) { return(this.GetGalleryImagePath(prev.ReloadUrl, values)); }
public override GalleryImagePath GetGalleryImagePath(GalleryImageView view, GalleryParameterValues values) { return(this.GetGalleryImagePath(view.Url, values)); }