find('div.container') as $section) { $title_element = $section->find('p.edition.tc', 0); $new_features_element = $section->find('div.list', 0); $date_element = $section->find('p.tc.time', 0); if ($title_element && $new_features_element && $date_element) { $item = []; $item['title'] = str_replace(' ChangeLog', '', $title_element->plaintext); // Remove "ChangeLog" $item['timestamp'] = strtotime(str_replace('Freigegeben am', '', $date_element->plaintext)); $item['uri'] = self::URI; $item['uid'] = $item['title']; $item['content'] = $new_features_element->outertext; $this->items[] = $item; } } // Extract updates from the history section $history_section = $html->find('div.update-his', 0); if ($history_section) { foreach($history_section->find('div.list') as $history_update) { $title_element = $history_update->find('p.edition.tl', 0); $date_element = $history_update->find('p.tl.time', 0); if ($title_element && $date_element) { $item = []; $item['title'] = $title_element->plaintext; $item['timestamp'] = strtotime(str_replace('Freigegeben am', '', $date_element->plaintext)); $item['uri'] = self::URI; $item['uid'] = $title_element->plaintext; // Remove the title and date from the content $history_update->find('p.edition.tl', 0)->outertext = ''; $history_update->find('p.tl.time', 0)->outertext = ''; $item['content'] = $history_update->innertext; $this->items[] = $item; } } } } public function getIcon() { return 'https://y2mate.ch/favicon.ico'; } }