public void Test() { var useXWV = ReadResource <bool>("Use XWebView as http service?"); IHttpService http; if (useXWV) { //XWV client used to execute scripts and prevent ban. if (_xwv == null) { _xwv = new OffScreenCefSharpXWebViewProvider().Resolve(XWebViewVisibility.Hidden).Result; } http = new XWebViewHttpService(_xwv); } else { http = new HttpService(new HttpClient()); } var parser = new BestChangeParser(http); var list = parser.Parse("https://www.bestchange.ru/bitcoin-to-bitcoin-cash.html").Result; Cmd.WriteLine(JsonConvert.SerializeObject(list, Formatting.Indented)); Cmd.WriteLine("Call number: " + _callNum++); Cmd.WriteLine("---------------"); }
public void TestHidemy() { var settings = new HidemyProxyParseSettings { MaxTime = 1000, Limit = int.MaxValue }; var httpService = new XWebViewHttpService(GetXWV()); var parser = new HidemyProxyParser(httpService); var list = parser.Parse(settings).Result; Cmd.WriteLine(JsonConvert.SerializeObject(list, Formatting.Indented)); Cmd.WriteLine("\n\nCall number: " + _callNum++); Cmd.WriteLine("Records count: " + list.Count); Cmd.WriteLine("---------------"); }