지금 바로 30일 무료 체험판 키를 받으세요.
체험판 라이선스는 다음 주소로 발송됩니다.
신용카드나 계정 생성은 필요하지 않습니다.
지금 바로 30일 무료 체험판 키를 받으세요.
체험판 라이선스는 다음 주소로 발송됩니다.
신용카드나 계정 생성은 필요하지 않습니다.
워터마크 없이 실제 운영 환경에서 테스트해 보세요.
필요한 곳 어디에서든 작동합니다.
모든 기능을 갖춘 제품을 30일 동안 사용해 보세요.
몇 분 안에 설치를 완료하고 작동시킬 수 있습니다.
제품 체험 기간 동안 당사 지원 엔지니어링 팀에 대한 모든 접근 권한을 확보할 수 있습니다.
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
Public Shared Sub Main(ByVal 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(ByVal 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 title_link
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
Install-Package IronWebScraper
코드를 살펴보고 실행하여 샘플을 확인하세요.