]>
git.wh0rd.org - tt-rss.git/blob - plugins/af_comics/filters/af_comics_comicclass.php
2 class Af_Comics_ComicClass
extends Af_ComicFilter
{
5 return array("Loading Artist");
8 function process(&$article) {
9 $owner_uid = $article["owner_uid"];
11 if (strpos($article["guid"], "loadingartist.com") !== FALSE) {
13 // lol at people who block clients by user agent
14 // oh noes my ad revenue Q_Q
16 $res = fetch_file_contents($article["link"], false, false, false,
18 "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)");
20 $doc = new DOMDocument();
21 @$doc->loadHTML($res);
26 $xpath = new DOMXPath($doc);
27 $basenode = $xpath->query('//div[@class="comic"]')->item(0);
30 $article["content"] = $doc->saveXML($basenode);