]>
git.wh0rd.org - tt-rss.git/blob - plugins/af_comics/filters/af_comics_tfd.php
eeec28fa3bddf48340845e55d7eade93dce1c30c
2 class Af_Comics_Tfd
extends Af_ComicFilter
{
5 return array("Toothpaste For Dinner", "Married to the Sea");
8 function process(&$article) {
9 if (strpos($article["link"], "toothpastefordinner.com") !== FALSE ||
10 strpos($article["link"], "marriedtothesea.com") !== FALSE) {
11 $res = fetch_file_contents($article["link"], false, false, false,
13 "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)");
15 if (!$res) return $article;
17 $doc = new DOMDocument();
18 @$doc->loadHTML(fetch_file_contents($article["link"]));
23 $xpath = new DOMXPath($doc);
24 $basenode = $xpath->query('//img[contains(@src, ".gif")]')->item(0);
27 $article["content"] = $doc->saveXML($basenode);