IRONSOFTWAREHOME
C# 웹 스크래퍼
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# 웹 스크래퍼

C# 웹 스크래퍼

IronWebScraper는 C# 코드를 사용하여 웹사이트에서 데이터와 파일을 추출하는 강력한 프레임워크를 제공합니다.

  1. NuGet 사용하여 프로젝트에 IronWebScraper를 설치합니다.
  2. WebScraper을(를) 확장하는 클래스를 생성합니다.
  3. 최소한 하나의 URL을 구문 분석하기 위해 Request 메서드를 사용하는 Init 메서드를 만드세요.
  4. 요청을 처리하기 위한 Parse 메서드를 생성하고, 확실히 Request 페이지를 더 만듭니다. response.Css을(를) 사용하여 jQuery 스타일의 CSS 선택자로 HTML 요소를 조작하세요.
  5. 응용 프로그램에서 웹 스크래핑 클래스의 인스턴스를 생성하고 Start(); 메서드를 호출합니다.
  6. 우리 C# 웹 스크래핑 튜토리얼을 읽고, IronWebScraper를 사용하여 고급 웹 크롤러를 만드는 방법을 배워보십시오.
C#을 사용하여 온라인 영화 웹사이트에서 데이터를 추출하는 방법을 알아보세요.
GitHub에서 보기

시작할 준비 되셨나요?

Nuget Downloads 143,929버전:2026.9방금 출시

Key in blue circle

무료 30일 체험 키를 즉시 받으세요.

Your trial license will be sent to your email address

제한 없음. 100% 무제한 이용. 신용카드 불필요.

bullet_checked신용카드나 계정 생성은 필요하지 않습니다.제한 없음. 100% 무제한 이용. 신용카드 불필요.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
무료 라이브 데모를 예약하세요
Booking Badge

전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
Iron Software의 고객 로고
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.