find('div.component-block h3.component-header'); foreach ($versionBlocks as $versionHeader) { // Get version number from header $versionText = trim($versionHeader->find('div.text', 0)->plaintext ?? ''); if (empty($versionText)) continue; // Skip branch names - only process actual version numbers (e.g., Version 0.1.0, Version 1.2.3) if (!preg_match('/^Version\s+\d+\./', $versionText)) continue; // Remove "Version " prefix to get clean version number $versionNumber = preg_replace('/^Version\s+/', '', $versionText); // Get the parent block containing all version information $versionBlock = $versionHeader->parent(); if (!$versionBlock) continue; $item = []; $item['title'] = 'Futurama: Hit & Run - Version ' . $versionNumber; $item['uid'] = 'futurama-har-' . $versionNumber; // Find version ID from badges $badges = $versionBlock->find('div.component-badge'); foreach ($badges as $badge) { $badgeText = $badge->plaintext; if (strpos($badgeText, 'ID ') !== false) { preg_match('/ID (\d+)/', $badgeText, $matches); if (isset($matches[1])) { $item['uid'] = 'futurama-har-id-' . $matches[1]; } } // Get published date if (strpos($badgeText, 'Published') !== false) { $timeElement = $badge->find('time.component-human-time', 0); if ($timeElement && $timeElement->datetime) { $item['timestamp'] = strtotime($timeElement->datetime); } } } // Use the project downloads page as article link $item['uri'] = self::URI; // Find download link for content $downloadLink = null; $downloadBtn = $versionBlock->find('a.component-button', 0); if ($downloadBtn && $downloadBtn->href) { $downloadLink = 'https://modbakery.donutteam.com' . $downloadBtn->href; } // Build content $content = ''; // Add banner $content .= '
';
$content .= '