'href', 'src' => 'src', 'data-original' => 'src' ); private function getDomain() { $domain = $this->getInput('domain'); if (empty($domain)) $domain = self::DEFAULT_DOMAIN; if (strpos($domain, '://') === false) $domain = 'https://' . $domain; return $domain; } public function getURI() { return self::URI; } public function collectData() { $html = getSimpleHTMLDOM($this->getURI()) or returnServerError('Could not request ' . $this->getURI()); // Since GQ don't want simple class scrapping, let's do it the hard way and ... discover content ! $main = $html->find('div[id=root]', 0); foreach ($main->find('h2') as $release) { $item = array(); $item['author'] = self::AUTHOR; $release_text = $release->innertext; if (preg_match('/(.+) \((.*)\)/', $release_text, $matches)) { $item['title'] = $matches[1]; // And now, build the date from the date text $item['timestamp'] = strtotime($matches[2]); } $item['uri'] = $this->getURI(); $item['content'] = $release->next_sibling (); $this->items[] = $item; } } }