C# 網路爬蟲庫
超越基本的 HTML 解析。取得適用於 .NET 10的多執行緒自動化網頁抓取功能,可大規模提取和匯出結構化資料。
- 使用 CSS 選擇器、XPath 和 JavaScript 渲染進行抓取
- 多線程處理數百個並發請求
- 支援限流、代理、用戶代理和 robots.txt
- 免費試用 30 天,功能齊全,無需信用卡
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 ClassImports 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可與AI編碼代理配合使用
Claude
Codex
GitHub Copilot
Cursor
Antigravity
其他編碼代理
在您的基礎設施內運行
無MCPs或外部處理。 IronWebScraper在您的應用程式內執行, 文件由您控制。
適合 AI 使用的文件
清晰的文件、API參考和教學有助於程式設計代理有效使用IronWebScraper。
為企業工作流程而建
在需要準確性、一致性和控制的位置添加企業級文件功能。
跨平台支援
設計用於C#, F#, & VB.NET運行於.NET 10, 9, 8, 7, 6, 5, Core, Standard或Framework
為什麼選擇IronWebScraper
從單個C#類刮取數千頁面。CSS選擇器、XPath、JavaScript渲染、虛擬身份和禮貌控制在一個程式庫中。
廣泛的爬取能力
- 使用CSS選擇器或XPath表達式進行解析;類似jQuery的語法。
- 渲染JavaScript頁面,而不僅僅是靜態HTML。
- 輸出到C#類實例、JSON或下載的文件。
5 分鐘即可上手
- → 5 分鐘快速開始。
- 簡單的 API:
Request(url, Parse),response.Css(".selector"),Scrape(data). - 智慧預設:多執行緒、禮貌和緩存由框架處理。
企業級效能
- .NET 10、Core、Standard 或 Framework
- 支持 C#、VB.NET、F#。DigiCert 簽署的二進制文件。
- 無處不在:Windows、Linux、macOS、Docker、Azure、AWS。
禮貌、彈性和審核友好
- 限流、代理支持、用戶代理和robots.txt相容內建。
- 虛擬用戶身份:每請求用戶代理、cookies、登錄和IP。
- 自動保存的工作在例外、崩潰或停電後繼續。
以開發者為先的支援與許可
- 永久授權:買一次,永久使用。選擇性更新和續訂。
- 24/5 工程師支援(Premium 中 24/7)。真人支持,中位數聊天響應時間 <1 分鐘。
- 30 天退款保證不合適?全額退款,不問原因。
給開發者
- 您實際需要的功能:
- CSS 選擇器 & XPath
- 多執行緒抓取
- 代理 & 使用者代理輪換
- 虛擬使用者身份
- 崩潰後自動恢復
- JavaScript渲染
- 節流及禮貌
- robots.txt遵循
- 行動重播(離線)
- JSON 或類別輸出
- 適用於所有地方:Windows、Linux、macOS、Docker、Azure、AWS。
給買家
- 受到 Iron 套件數百萬工程師的信賴。
- 專為真實工作負載構建:系統遷移、競爭性分析、搜尋索引、資料挖掘。
- 友好的採購方案:永久授權,選擇性續訂,提供發票,多種付款選擇(包括本地:Amazon Pay、Alipay、Apple Pay、IDEAL、SEPA、ACH)。
- 30 天退款保證。
深受全球數百萬工程師信賴
開始使用: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);
}
}
}
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 ClassImports 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
直接從我們的開發團隊獲得人性化支援
無論是產品、整合還是許可查詢,Iron產品開發團隊都隨時準備支援您的所有問題。與Iron聯繫,開始對話,以便在您的專案中充分利用我們的庫。強大的爬取引擎掌握在您手中
只需編寫一個 C# 網路爬蟲類別即可將成千上萬甚至數百萬的網頁抓取到 C# 類別實例、JSON 或下載文件中。IronWebScraper 允許您編寫簡明、線性的工作流程,模擬人類的瀏覽行為。IronWebScraper 將您的代碼作為一群虛擬網路瀏覽器運行,大量併行,但卻禮貌而容錯。
簡單、靈活的邏輯
IronWebScraper 必須被編程以知道如何處理它遇到的每種“類型”的頁面。這可以通過很簡明的方式使用 CSS 選擇器或 XPath 表達式來實現,並且可以在 C# 中完全自定義。這種自由使得您可以決定在哪個網站內抓取哪些頁面,以及對提取的資料進行何種操作。每種方法都可以在 Visual Studio 中使用調試和觀看。快速而禮貌的行為
IronWebScraper 處理多執行緒和網路請求,以允許數百個同時進行的執行緒而無需開發人員管理它們。可以設置禮貌以限制請求,從而減少目標網頁伺服器上的過載風險。
創建虛擬用戶身份
IronWebScraper 可以使用一個或多個“身份” - 模擬現實世界人類請求的會話。每個請求都可以以編程方式或隨機分配其自己的身份、用戶代理、Cookie、登入甚至是 IP 地址。請求被設置為自動唯一,使用 URL、解析方法和發佈變量的結合。行動重播
IronWebScraper 使用高級快取,使開發人員能夠“即時”更改其代碼並重播每個先前的請求而不聯網。每個爬取任務自動保存,並且在發生異常或停電時可以恢復。快速安裝使用 Microsoft Visual Studio
IronWebScraper 使用 Visual Studio 安裝程序快速將網路爬蟲工具掌握在您手中。無論是在 Visual Studio 中直接從 NuGet 安裝還是下載 DLL,您都可以毫不費力地安裝。只需一個 DLL 且無需依賴。支援:
.NET 網路爬蟲社群教程

VBC#ASP.NET
C# 和 VB.NET 專案中的網路爬蟲
查看 Ahmed 如何在他的專案中使用 IronWebScraper 從一個網站遷移內容到另一個網站。為電子商務和部落格網站的爬取提供示例專案和代碼。
我們的客戶使用 IronWebScraper 進行...
會計和財務系統
- # 收據
- # 報告
- # 發票列印
業務數位化
- # 文件
- # 訂單與標籤
- # 取代紙張

企業內容管理
- # 內容製作
- # 文件管理
- # 內容分發

資料和報告應用
- # 績效追蹤
- # 趨勢映射
- # 報告

數千個公司、政府、中小型企業和開發人員都信任 Iron 軟體產品。
Iron 的團隊有超過 10 年的 .NET 軟體組件市場經驗。








準備好開始了嗎?
NuGet 下載次數 150,502|版本:2026.11剛剛發布









