3
1
Back

"berkeleymews.com/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); // there's both alt and title texts, they're both different, use both. } elseif (strpos($alt_text, $title_text) !== False) { if (preg_match("@.*( if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] = $img; } //Sites that provide images and just need alt tags if (preg_match("@.*()@", $article['content'], $matches)) { // only keep everything starting at the first elseif (strpos($article['link'], 'girlswithslingshots.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, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } Clean up code formatting.

New Pull Request