fedi-feed-router/backend/app/Services/Parsers/VrtHomepageParserAdapter.php

28 lines
582 B
PHP
Raw Normal View History

2025-06-29 21:33:18 +02:00
<?php
namespace App\Services\Parsers;
use App\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';
}
}