3
1
Back

$img; if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } // Dead Philosophers elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $article['content'] .= "

Bonus comic:
" . $aftercomic . ""; // Camp Weedonwantcha elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] .= "Bonus comic:" . $aftercomic . "

"; // only keep everything starting at the first elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // } elseif (strpos($alt_text, $title_text) !== False) { $alt_text = trim($img->getAttribute('title')); if (!$alt_text) { $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } .

New Pull Request