Lightweight .NET web scraper
LightWebNetScraper is a .NET project for doing simple scraping tasks.
The project consist of a libary.
Supports plain XPATH or XSLT.
- Include the nuget package and checkout the code example.
- Nuget link https://www.nuget.org/packages/LightWebNetScraper
var scraper = new Scraper();
var result = scraper.StartScraping(new List<ScrapeInfo<string>>()
{
new ScrapeInfo<string>(
"https://www.nuget.org/packages/LightWebNetScraper",
(htmlDoc, scrapeInfo) => htmlDoc.DocumentNode.SelectSingleNode(@"//div[@class='package-title']/h1").InnerHtml)
});
Console.WriteLine(result[0]);
Console.ReadLine();
The InnerHtml in this case is "Renerotvig"
LightWebNetScraper is licensed under The MIT License (MIT). Basically, this license grants you the right to use LightWebNetScraper in any way you see fit. See License.md for more info.