EventScraper
class EventScraper (View source)
The EventScraper class is responsible for scraping event details from a given URL and returning an EventDTO.
It uses an HTTP client to fetch the HTML content and a parser to extract the relevant information.
Example usage: $httpClient = new DefaultHttpClient(); $parser = new ParseEvent(); $scraper = new EventScraper($httpClient, $parser); $eventDTO = $scraper->scrape('https://www.blackcombat.com/event/123'); // $eventDTO will contain the scraped event details
Methods
Details
__construct(HttpClientInterface $http, ParseEvent $parser)
EventScraper constructor.
EventDTO
scrape(string $url)
Scrape event details from the given URL and return an EventDTO.