23 lines
No EOL
480 B
PHP
23 lines
No EOL
480 B
PHP
<?php
|
|
|
|
namespace App\Services\Parsers;
|
|
|
|
use App\Contracts\ArticleParserInterface;
|
|
|
|
class BelgaArticleParser implements ArticleParserInterface
|
|
{
|
|
public function canParse(string $url): bool
|
|
{
|
|
return str_contains($url, 'belganewsagency.eu');
|
|
}
|
|
|
|
public function extractData(string $html): array
|
|
{
|
|
return BelgaArticlePageParser::extractData($html);
|
|
}
|
|
|
|
public function getSourceName(): string
|
|
{
|
|
return 'Belga News Agency';
|
|
}
|
|
} |