public static RuntimeTable <DownloadImage> DownloadImage(IRuntime runtime, string url, int line) { var table = new RuntimeTable <DownloadImage>(); var image = GetImage(runtime.RequestFactory, new WebRequestHttpWire(url, runtime, line)); table.Add(image); return(table); }
private static RuntimeTable <DownloadPage> DownloadPage(IRuntime runtime, IHttpWire[] wires) { var table = new RuntimeTable <DownloadPage>(); foreach (var wire in wires) { int contentlength; var doc = GetDocument(runtime.RequestFactory, wire, out contentlength); table.Add(new DownloadPage() { url = wire.Url, nodes = DownloadedNodes.FromHtmlDoc(doc), date = DateTime.Now, size = contentlength }); } return(table); }
private static RuntimeTable <DownloadPage> DownloadPage(IRuntime runtime, string[] urls) { var table = new RuntimeTable <DownloadPage>(); foreach (var url in urls) { int contentlength; var doc = GetDocument(runtime.RequestFactory, url, out contentlength); table.Add(new DownloadPage() { url = url, nodes = new[] { doc.DocumentNode }, date = DateTime.Now, size = contentlength }); } return(table); }