예제 #1
0
        public HitomiAgent(Site site, DownloadInput downloadInput, WebRequestProvider webRequestProvider) : base(site, downloadInput, webRequestProvider)
        {
            var engine = this.JintEngine = new Engine();

            engine.Execute("var document = {};");
            engine.Execute("document.body = {};");
            engine.Execute("document.body.appendChild = function(){};");
            engine.Execute("document.location = {};");
            engine.Execute("document.location.hostname = '';");
            engine.Execute("document.createElement = function(){ return {}; };");
            engine.Execute("document.ready = function(func){ return func(); };");
            engine.Execute("document.mouseenter = function(func){ return document; };");
            engine.Execute("document.mouseleave = function(func){ return document; };");
            engine.Execute("document.click = function(func){ return document; };");
            engine.Execute("document.each = function(func){ return document; };");
            engine.Execute("var $ = function(data){ return document; };");
            engine.SetValue("ajax", new Action <object>(ExecuteAJax));
            engine.Execute("setTimeout = function(){};");
            engine.Execute("HTMLImageElement = function(){};");
        }
        public override GalleryAgent CreateAgent(DownloadInput downloadInput, WebRequestProvider webRequestProvider)
        {
            var account = DoujinshiDownloader.Instance.Config.Values.Agent.ExHentaiAccount;

            return(new ExHentaiAgent(this.Site, downloadInput, webRequestProvider, account));
        }
예제 #3
0
 public override GalleryAgent CreateAgent(DownloadInput downloadInput, WebRequestProvider webRequestProvider)
 {
     return(new ExHentaiAgent(this.Site, downloadInput, webRequestProvider, null));
 }
예제 #4
0
 public abstract GalleryAgent CreateAgent(DownloadInput downloadInput, WebRequestProvider webRequestProvider);
예제 #5
0
 public GalleryAgent(Site site, DownloadInput downloadInput, WebRequestProvider webRequestProvider)
 {
     this.Site               = site;
     this.DownloadInput      = downloadInput;
     this.WebRequestProvider = webRequestProvider;
 }
 public ExHentaiAgent(Site site, DownloadInput downloadInput, WebRequestProvider webRequestProvider, ExHentaiAccount account) : base(site, downloadInput, webRequestProvider)
 {
     this.Account = account != null ? new ExHentaiAccount(account) : null;
 }