'Crawling urls and scraping Data using task parallel library
I have Created a Crawl class which has some Properties and then creating an array to store multiple urls, to fetch these URLs I am using task parallel library.
await Parallel.ForEachAsync(langUrls, parallelOptions, async (uri, token) =>
{
var article = await client.GetFromJsonAsync<Crawl>(uri, token);
Console.WriteLine($"Id:{article.Id}\n Name:{article.Name} \n Article: {article.Article} \n Language: {article.Language}\n Url:{article.URl} ");
});
I am getting an error which says :-'Crawl.URL' cannot be accessed with an instance reference; qualify it with a type name instead
Solution 1:[1]
Beyond the error you have. I suggest you read this article for Crawl in .Net
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Karim Fahmy |