Esempio n. 1
0
        public CasperScraper(CasperSettings settings)
        {
            _settings = settings;

            if (_settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            if (string.IsNullOrWhiteSpace(_settings.CasperjsExePath))
            {
                throw new ArgumentNullException("settings.CasperjsExePath");
            }

            Debugger       = false;
            DebuggerPort   = 9001;
            DebuggerRemote = "http://localhost";
            OutputEncoding = Encoding.GetEncoding("GB2312");
            ExecuteTimeout = TimeSpan.Zero;
        }
Esempio n. 2
0
 static CasperScraper()
 {
     CasperSettings.VerifyEnvironment();
 }