3
1
Back

And title texts, they're both different, use both. } elseif (strpos($title_text, $alt_text) !== False) { if (preg_match("@.*()@", $article['content'], $matches)) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } // } elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // Eat That Toast bog-standard example // Breaking Cat News // Something Positive elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { // And get blog $entries = $xpath->query("//div[@class='entry']"); // VG Cats $vgcats_url = $vgcats_url_node->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); $alt_text = false; $title_text = trim($img->getAttribute('title')); $title_text = trim($img->getAttribute('title')); $title_text .

New Pull Request