Revert "Add support for sillies"
idiot submitter breaks all embedding with his genius strategy of
handling all posts with now News: in title
This reverts commit a3013adedd
.
This commit is contained in:
parent
1ae46c5033
commit
1929149661
|
@ -8,8 +8,8 @@ class Af_Comics_Cad extends Af_ComicFilter {
|
|||
function process(&$article) {
|
||||
$owner_uid = $article["owner_uid"];
|
||||
|
||||
if (strpos($article["title"], "News:") === FALSE) {
|
||||
if (strpos($article["link"], "cad-comic.com/cad/") !== FALSE) {
|
||||
if (strpos($article["title"], "News:") === FALSE) {
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML(fetch_file_contents($article["link"]));
|
||||
|
@ -24,22 +24,7 @@ class Af_Comics_Cad extends Af_ComicFilter {
|
|||
$article["content"] = $doc->saveXML($basenode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elseif (strpos($article["link"], "cad-comic.com/sillies/") !== FALSE) {
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML(fetch_file_contents($article["link"]));
|
||||
|
||||
$basenode = false;
|
||||
|
||||
if ($doc) {
|
||||
$xpath = new DOMXPath($doc);
|
||||
$basenode = $xpath->query('(//img[contains(@src, "/comics/sillies-")])')->item(0);
|
||||
|
||||
if ($basenode) {
|
||||
$article["content"] = $doc->saveXML($basenode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue