3
1
Back

(end 1.61 2.556 (end 1.61 2.556 (end 1.61 -1.04 (end 1.49 2.569 (end 1.49 -1.04 (end 2.371 -1.04 (end 3.491 1.319 (end 3.491 -1.04 (end 1.45 2.573 (end 1.41 2.576 (end 1.37 2.578 (end 1.33 -1.27 (end -1.33 -1.27 (end -1.33 -6.41 (end -1.33 1.33 (end -1.33 1.33 (end -1.33 -1.27 (end -1.33 -6.41 (end -1.33 0 (end 0.2 -0.35 (end -0.5 0 (end -0.3 0 (end 1.8 1.8 (end -0.635 1.27 (end -1.27 0.635 (end -1.27 -6.35 (end 1.27 -13.97 (end 2.286 1.016 (end -2.286 -1.016 (offset 0.254) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end 0 7.493 (end 0 -7.747 (end 0 10.033 (end 1.27 -13.97 (end 2.286 1.016 (end -2.286 -1.016 (offset 0.254) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end -3.81 -2.54 (end -2.54 -5.08 (offset 1.016) hide (end 1.016 2.54 (end -1.016 -2.54 (offset 0) hide From 713014315986726ad96f361cfbc8e67551a6a879 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); $alt_text = trim($entry->getAttribute('title')); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } //Sites that provide images and just need alt tags if both exist Updated LICD, alter alt-textify to handle both title and alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "

" . $entry->textContent . "

"; } } // Wondermark (alt tag already present elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // $img_tag = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // And get blog entry $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } drugs & wires, pilotside 2018-11-20 08:29:13 -08:00 // Poorly Drawn Lines elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Invisible Bread (make the bread visible) $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // Doghouse Diaries, which has broken alt.

New Pull Request