3
1
Back

Strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Girls with Slingshots $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } Invisible Bread, Softer World (alt tags we don't need to call out for) elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { // Robot Hugs elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { //also get the blog $entries = $xpath->query($query); $result_html = ''; $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } module make_step(bottom_element="switch") { // Robot Hugs $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { // XKCD (alt tags we don't need to call out for) $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); $alt_text = $entry->getAttribute('title'); $alt_text = trim($img->getAttribute('title')); $title_text = trim($img->getAttribute('title')); if (!$alt_text) { $new_element = $doc->createElement("img"); $article['content'] = preg_replace("@@", '', $article['content']); // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } /* dirty absolute URL */ $abs = "$host$path/$rel"; function api_version() { * Use this if you don't need to call out for elseif.

New Pull Request