mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 08:07:33 +02:00
Error handling in ExplosmBridge (#4600)
Skip further processing if element was not found to avoid errors
This commit is contained in:
@@ -36,6 +36,9 @@ class ExplosmBridge extends BridgeAbstract
|
||||
$html = getSimpleHTMLDOM($url);
|
||||
|
||||
$element = $html->find('[class*=ComicImage]', 0);
|
||||
if(!$element) {
|
||||
break; // skip, if element was not found
|
||||
}
|
||||
$date = $element->find('[class^=Author__Right] p', 0)->plaintext;
|
||||
$author = str_replace('by ', '', $element->find('[class^=Author__Right] p', 1)->plaintext);
|
||||
$image = $element->find('img', 0)->src;
|
||||
|
Reference in New Issue
Block a user