PHP 클래스 Spatie\Crawler\Crawler

파일 보기 프로젝트 열기: spatie/crawler 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$baseUrl Url
$baseUrl Spatie\Crawler\Url;
$client GuzzleHttp\Client
$concurrency integer
$crawlObserver Spatie\Crawler\CrawlObserver
$crawlProfile Spatie\Crawler\CrawlProfile
$crawlQueue CrawlQueue
$crawledUrls Illuminate\Support\Collection

공개 메소드들

메소드 설명
__construct ( Client $client )
__construct ( Client $client, integer $concurrency = 10 )
create ( ) : static
create ( array $clientOptions = [] ) : static
setConcurrency ( integer $concurrency )
setCrawlObserver ( Spatie\Crawler\CrawlObserver $crawlObserver )
setCrawlProfile ( Spatie\Crawler\CrawlProfile $crawlProfile )
startCrawling ( Url | string $baseUrl )

보호된 메소드들

메소드 설명
addAllLinksToCrawlQueue ( string $html, Url $foundOnUrl )
crawlAllLinks ( string $html ) Crawl all links in the given html.
crawlUrl ( Url $url ) Crawl the given url.
extractAllLinks ( string $html ) : Collection
getAllLinks ( string $html ) : Url[] Get all links in the given html.
getCrawlRequests ( ) : Generato\Generator
handleResponse ( Psr\Http\Message\ResponseInterface | null $response, integer $index )
hasAlreadyCrawled ( Url $url ) : boolean Determine if the crawled has already crawled the given url.
normalizeUrl ( Url $url ) Normalize the given url.
normalizeUrl ( Url $url ) : Url
startCrawlingQueue ( )

메소드 상세

__construct() 공개 메소드

public __construct ( Client $client )
$client GuzzleHttp\Client

__construct() 공개 메소드

public __construct ( Client $client, integer $concurrency = 10 )
$client GuzzleHttp\Client
$concurrency integer

addAllLinksToCrawlQueue() 보호된 메소드

protected addAllLinksToCrawlQueue ( string $html, Url $foundOnUrl )
$html string
$foundOnUrl Url

crawlUrl() 보호된 메소드

Crawl the given url.
protected crawlUrl ( Url $url )
$url Url

create() 공개 정적인 메소드

public static create ( ) : static
리턴 static

create() 공개 정적인 메소드

public static create ( array $clientOptions = [] ) : static
$clientOptions array
리턴 static

getCrawlRequests() 보호된 메소드

protected getCrawlRequests ( ) : Generato\Generator
리턴 Generato\Generator

handleResponse() 보호된 메소드

protected handleResponse ( Psr\Http\Message\ResponseInterface | null $response, integer $index )
$response Psr\Http\Message\ResponseInterface | null
$index integer

hasAlreadyCrawled() 보호된 메소드

Determine if the crawled has already crawled the given url.
protected hasAlreadyCrawled ( Url $url ) : boolean
$url Url
리턴 boolean

normalizeUrl() 보호된 메소드

Normalize the given url.
protected normalizeUrl ( Url $url )
$url Url

normalizeUrl() 보호된 메소드

protected normalizeUrl ( Url $url ) : Url
$url Url
리턴 Url

setConcurrency() 공개 메소드

public setConcurrency ( integer $concurrency )
$concurrency integer

setCrawlObserver() 공개 메소드

public setCrawlObserver ( Spatie\Crawler\CrawlObserver $crawlObserver )
$crawlObserver Spatie\Crawler\CrawlObserver

setCrawlProfile() 공개 메소드

public setCrawlProfile ( Spatie\Crawler\CrawlProfile $crawlProfile )
$crawlProfile Spatie\Crawler\CrawlProfile

startCrawling() 공개 메소드

public startCrawling ( Url | string $baseUrl )
$baseUrl Url | string

startCrawlingQueue() 보호된 메소드

protected startCrawlingQueue ( )

프로퍼티 상세

$baseUrl 보호되어 있는 프로퍼티

protected Url,Spatie\Crawler $baseUrl
리턴 Url

$baseUrl 보호되어 있는 프로퍼티

protected Url;,Spatie\Crawler $baseUrl
리턴 Spatie\Crawler\Url;

$client 보호되어 있는 프로퍼티

protected Client,GuzzleHttp $client
리턴 GuzzleHttp\Client

$concurrency 보호되어 있는 프로퍼티

protected int $concurrency
리턴 integer

$crawlObserver 보호되어 있는 프로퍼티

protected CrawlObserver,Spatie\Crawler $crawlObserver
리턴 Spatie\Crawler\CrawlObserver

$crawlProfile 보호되어 있는 프로퍼티

protected CrawlProfile,Spatie\Crawler $crawlProfile
리턴 Spatie\Crawler\CrawlProfile

$crawlQueue 보호되어 있는 프로퍼티

protected CrawlQueue,Spatie\Crawler $crawlQueue
리턴 CrawlQueue

$crawledUrls 보호되어 있는 프로퍼티

protected Collection,Illuminate\Support $crawledUrls
리턴 Illuminate\Support\Collection