28 lines
No EOL
601 B
PHP
28 lines
No EOL
601 B
PHP
<?php
|
|
|
|
namespace Domains\Article\Parsers\Vrt;
|
|
|
|
use Domains\Article\Contracts\HomepageParserInterface;
|
|
|
|
class VrtHomepageParserAdapter implements HomepageParserInterface
|
|
{
|
|
public function canParse(string $url): bool
|
|
{
|
|
return str_contains($url, 'vrt.be');
|
|
}
|
|
|
|
public function extractArticleUrls(string $html): array
|
|
{
|
|
return VrtHomepageParser::extractArticleUrls($html);
|
|
}
|
|
|
|
public function getHomepageUrl(): string
|
|
{
|
|
return 'https://www.vrt.be/vrtnws/en/';
|
|
}
|
|
|
|
public function getSourceName(): string
|
|
{
|
|
return 'VRT News';
|
|
}
|
|
} |