IRONSOFTWAREHOME
C# Web Scraper
using IronWebScraper;

public class Program
{
    private static void Main(string[] args)
    {
        var ScrapeJob = new BlogScraper();
        ScrapeJob.Start();
    }
}

public class BlogScraper : WebScraper
{
    public override void Init()
    {
        LoggingLevel = LogLevel.All;
        Request("https://www.zyte.com/blog/", Parse);
    }

    public override void Parse(Response response)
    {
        foreach (HtmlNode title_link in response.Css(".oxy-post-title"))
        {
            string strTitle = title_link.TextContentClean;
            Scrape(new ScrapedData() { { "Title", strTitle } });
        }

        if (response.CssExists("div.oxy-easy-posts-pages > a[href]"))
        {
            string next_page = response.Css("div.oxy-easy-posts-pages > a[href]")[0].Attributes["href"];
            Request(next_page, Parse);
        }
    }
}
Imports IronWebScraper

Public Class Program
    Private Shared Sub Main(args As String())
        Dim ScrapeJob = New BlogScraper()
        ScrapeJob.Start()
    End Sub
End Class

Public Class BlogScraper
    Inherits WebScraper

    Public Overrides Sub Init()
        LoggingLevel = LogLevel.All
        Request("https://www.zyte.com/blog/", AddressOf Parse)
    End Sub

    Public Overrides Sub Parse(response As Response)
        For Each title_link As HtmlNode In response.Css(".oxy-post-title")
            Dim strTitle As String = title_link.TextContentClean
            Scrape(New ScrapedData() From {{"Title", strTitle}})
        Next

        If response.CssExists("div.oxy-easy-posts-pages > a[href]") Then
            Dim next_page As String = response.Css("div.oxy-easy-posts-pages > a[href]")(0).Attributes("href")
            Request(next_page, AddressOf Parse)
        End If
    End Sub
End Class
NuGet Download
PM > Install-Package IronWebScraper
C# Web Scraper

C# Web Scraper

IronWebScraper provides a powerful framework to extract data and files from websites using C# code.

  1. Install IronWebScraper to your Project using NuGet.
  2. Create a Class Extending WebScraper.
  3. Create an Init method that uses the Request method to parse at least one URL.
  4. Create a Parse method to process the requests, and indeed Request more pages. Use response.Css to work with HTML elements using jQuery style CSS selectors.
  5. In your application, create an instance of your web scraping class and call the Start(); method.
  6. Read our C# web scraping tutorials to learn how to create advanced web crawlers using IronWebScraper.
Discover How to Scrape Online Movie Websites with C#
View on GitHub

Ready to Get Started?

Nuget Downloads 143,929Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required