fix explosm comics plugin
This commit is contained in:
parent
d8895ec679
commit
945ecd7db6
|
@ -17,18 +17,7 @@ class Af_Comics_Explosm extends Af_ComicFilter {
|
||||||
|
|
||||||
if ($doc) {
|
if ($doc) {
|
||||||
$xpath = new DOMXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
$entries = $xpath->query('(//img[@src])'); // we might also check for img[@class='strip'] I guess...
|
$basenode = $xpath->query('(//img[@id="main-comic"])')->item(0);
|
||||||
|
|
||||||
$matches = array();
|
|
||||||
|
|
||||||
foreach ($entries as $entry) {
|
|
||||||
|
|
||||||
if (preg_match("/(http:\/\/.*\/db\/files\/Comics\/.*)/i", $entry->getAttribute("src"), $matches)) {
|
|
||||||
|
|
||||||
$basenode = $entry;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($basenode) {
|
if ($basenode) {
|
||||||
$article["content"] = $doc->saveXML($basenode);
|
$article["content"] = $doc->saveXML($basenode);
|
||||||
|
|
Loading…
Reference in New Issue