src/Crawler/AbstractCrawler.php
final protected function parseEvent(Crawler $node, DateTime $datetime = null): Event
    {
        $eventNode = $node->filter('.events-list-item-event--title a');

        $url = $this->parseUrl($eventNode);

        if (null === $url) {
            throw new CrawlException('Error parsing event id.');
        }

        $id = (int) preg_replace('/.*\/(\d+)+.*/', '$1', $url);

        if (0 === $id) {
            throw new CrawlException('Error parsing event id.');
        }

        if (null === $datetime) {
            try {
                $datetime = new DateTime($node->filter('time')->attr('datetime'));
            } catch (Exception $exception) {
                throw new CrawlException('Error reading event date', $exception->getCode(), $exception);
            }
        }

        $venue = $this->parseVenue($node->filter('.events-list-item-venue'));

        return new Event(
            $id,
            $this->parseString($eventNode) ?? '',
            $datetime,
            $url,
            $venue
        );
    }
final protected function parseEvent(Crawler $node, DateTime $datetime = null): Event
    {
        $eventNode = $node->filter('.events-list-item-event--title a');

        $url = $this->parseUrl($eventNode);

        if (null === $url) {
            throw new CrawlException('Error parsing event id.');
        }

        $id = (int) preg_replace('/.*\/(\d+)+.*/', '$1', $url);

        if (0 === $id) {
            throw new CrawlException('Error parsing event id.');
        }

        if (null === $datetime) {
            try {
                $datetime = new DateTime($node->filter('time')->attr('datetime'));
            } catch (Exception $exception) {
                throw new CrawlException('Error reading event date', $exception->getCode(), $exception);
            }
        }

        $venue = $this->parseVenue($node->filter('.events-list-item-venue'));

        return new Event(
            $id,
            $this->parseString($eventNode) ?? '',
            $datetime,
            $url,
            $venue
        );
    }
@param Crawler  $node
@param DateTime $datetime

@return Event