Beispiel #1
0
 /// <summary>
 /// Fetches all resources from a given set of pages in a parallelized way.
 /// </summary>
 /// <param name="items">The resources to query</param>
 /// <param name="pattern">The regex pattern which can match the required resource</param>
 /// <param name="baseFolder">The name of the subfolder in which the resources will be downloaded</param>
 /// <param name="progress">The progress reporting delegate</param>
 /// <returns>The fetched resources</returns>
 public async Task <IEnumerable <FetchedItem> > FetchAllAsync(IEnumerable <FetchedItem> items, FetchPattern pattern, string baseFolder = "", IProgress <ProgressReport> progress = null)
 {
     return(await FetchAllAsync(items, new FetchPattern[] { pattern }, baseFolder, progress));
 }
Beispiel #2
0
 /// <summary>
 /// Fetches all items from a remote page that match a given pattern.
 /// </summary>
 /// <param name="pageUri">The relative or absolute uri of the resource to query</param>
 /// <param name="baseFolder">The base folder where the structured data will be downloaded during ripping</param>
 /// <param name="pattern">The regex pattern which can match the required resource</param>
 /// <returns>All the found items</returns>
 public async Task <IEnumerable <FetchedItem> > FetchAsync(string pageUri, string baseFolder, FetchPattern pattern)
 {
     return(await FetchAsync(pageUri, baseFolder, new FetchPattern[] { pattern }));
 }