protected override void MyInit(params string[] arguments) { Downloader.AddCookies("sid=dea284fc36c24e8cbcd447343d7b8a4e; sn=DD962248; ctid=000000; ctnm=%E5%8F%A4%E9%95%87%E7%81%AF%E9%A5%B0%E6%89%B9%E5%8F%91; ctpv=%E5%B9%BF%E4%B8%9C; JSESSIONID=acbBqFfOD4I63d9PziDvv; DDENG=c4fc08ae2e3ba3efeddbc667c2f45e615a85e80009169501dc244a03e87908aa61146548b97ed9c7dc07af23bfd80bff5008f8c8867a9165d4bd2732aca0db7dedae2e042d3968fcad1150f36be242e8a32a3f59db2a0b39216a59f1628508c5799644532a9d99925f9841b3c13a1f97; userId=10003379; previousUser=%E5%A4%95%E7%8E%89; Hm_lvt_9e33f153f28be198970d205d90a24f28=1466146335; Hm_lpvt_9e33f153f28be198970d205d90a24f28=1466146392; Hm_lvt_54b4cb498afd05463ab4611b38a6f289=1466146335; Hm_lpvt_54b4cb498afd05463ab4611b38a6f289=1466146392; CNZZDATA1256982382=395301521-1466143554-%7C1466143554", "www.ddeng.com"); AddStartUrl("http://www.ddeng.com/product/982227"); AddPipeline(new ConsoleEntityPipeline()); AddEntityType <Corp>(); }
protected override void OnInit(params string[] arguments) { Dictionary <string, object> headers = new Dictionary <string, object>(); Downloader.AddCookies(StrCookie, "interweb.xmlib.net"); headers.Add("Cookie", StrCookie); AddHeaders("interweb.xmlib.net", headers); AddRequests("http://interweb.xmlib.net/opac/reader/space"); var pipeine = new XmlEntityPipeline(); //pipeine.Title = "厦门图书馆"; //pipeine.Description = "厦门图书馆"; //pipeine.Link = "http://interweb.xmlib.net/opac/reader/space"; AddPipeline(pipeine); AddEntityType <BookEntry>(); }
protected override void OnInit(params string[] arguments) { Downloader.AddCookies("sid=dea284fc36c24e8cbcd447343d7b8a4e; sn=DD962248; ctid=000000; ctnm=%E5%8F%A4%E9%95%87%E7%81%AF%E9%A5%B0%E6%89%B9%E5%8F%91; ctpv=%E5%B9%BF%E4%B8%9C; JSESSIONID=acbBqFfOD4I63d9PziDvv; DDENG=c4fc08ae2e3ba3efeddbc667c2f45e615a85e80009169501dc244a03e87908aa61146548b97ed9c7dc07af23bfd80bff5008f8c8867a9165d4bd2732aca0db7dedae2e042d3968fcad1150f36be242e8a32a3f59db2a0b39216a59f1628508c5799644532a9d99925f9841b3c13a1f97; userId=10003379; previousUser=%E5%A4%95%E7%8E%89; Hm_lvt_9e33f153f28be198970d205d90a24f28=1466146335; Hm_lpvt_9e33f153f28be198970d205d90a24f28=1466146392; Hm_lvt_54b4cb498afd05463ab4611b38a6f289=1466146335; Hm_lpvt_54b4cb498afd05463ab4611b38a6f289=1466146392; CNZZDATA1256982382=395301521-1466143554-%7C1466143554", "www.ddeng.com"); AddRequest(new Request("http://www.ddeng.com/product/982227") { Headers = new Dictionary <string, object> { { "Cache-Control", "max-age=0" }, { "Upgrade-Insecure-Requests", "1" } }, UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36", Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" }); AddPipeline(new ConsoleEntityPipeline()); AddEntityType <Corp>(); }
protected override void OnInit(params string[] arguments) { InitData(); Identity = ("CompanySpider_" + DateTime.Now.ToString("yyyy_MM_dd_HHmmss")); var _cookieList = new List <string>(); _cookieList.Add("QCCSESSID=u1qlm3camss8fo0cg61ltd6010"); _cookieList.Add("_uab_collina=154147884445273729213581"); Downloader.AddCookies(string.Join(";", _cookieList), ".qichacha.com"); SleepTime = 1000 * 5; EmptySleepTime = 1000 * 60 * 10; AddPipeline(new CompanyPipeline()); AddPageProcessor(new CompanyProcessor()); AddRequests("https://www.qichacha.com/search?key=CompanyProcessors"); AddEntityType <CompanyEntity>(); }