PHP Class PicoFeed\Scraper\Scraper

Author: Frederic Guillot
Inheritance: extends PicoFeed\Base
Mostrar archivo Open project: fguillot/picofeed Class Usage Examples

Public Methods

Method Description
disableCandidateParser ( ) : Scraper Disable candidates parsing.
download ( ) : boolean Download the HTML content.
execute ( $pageContent = '', $recursionDepth ) Execute the scraper.
getEncoding ( ) : string Get encoding.
getFilteredContent ( ) : string Get filtered relevant content.
getParser ( ) : PicoFeed\Scraper\ParserInterface Get the parser.
getRawContent ( ) : string Get raw content (unfiltered).
getRelevantContent ( ) : string Get relevant content.
getUrl ( ) : string Get URL to download.
hasRelevantContent ( ) : boolean Return true if the scraper found relevant content.
prepareHtml ( ) Normalize encoding and strip head tag.
setEncoding ( string $encoding ) : Scraper Set encoding.
setRawContent ( string $html ) : Scraper Set raw content (unfiltered).
setUrl ( string $url ) : Scraper Set URL to download.

Method Details

disableCandidateParser() public method

Disable candidates parsing.
public disableCandidateParser ( ) : Scraper
return Scraper

download() public method

Download the HTML content.
public download ( ) : boolean
return boolean

execute() public method

Execute the scraper.
public execute ( $pageContent = '', $recursionDepth )

getEncoding() public method

Get encoding.
public getEncoding ( ) : string
return string

getFilteredContent() public method

Get filtered relevant content.
public getFilteredContent ( ) : string
return string

getParser() public method

Get the parser.
public getParser ( ) : PicoFeed\Scraper\ParserInterface
return PicoFeed\Scraper\ParserInterface

getRawContent() public method

Get raw content (unfiltered).
public getRawContent ( ) : string
return string

getRelevantContent() public method

Get relevant content.
public getRelevantContent ( ) : string
return string

getUrl() public method

Get URL to download.
public getUrl ( ) : string
return string

hasRelevantContent() public method

Return true if the scraper found relevant content.
public hasRelevantContent ( ) : boolean
return boolean

prepareHtml() public method

Normalize encoding and strip head tag.
public prepareHtml ( )

setEncoding() public method

Set encoding.
public setEncoding ( string $encoding ) : Scraper
$encoding string
return Scraper

setRawContent() public method

Set raw content (unfiltered).
public setRawContent ( string $html ) : Scraper
$html string
return Scraper

setUrl() public method

Set URL to download.
public setUrl ( string $url ) : Scraper
$url string URL
return Scraper