diff --git a/bridges/ExplosmBridge.php b/bridges/ExplosmBridge.php index ae197e2b..1572fb56 100644 --- a/bridges/ExplosmBridge.php +++ b/bridges/ExplosmBridge.php @@ -36,7 +36,7 @@ class ExplosmBridge extends BridgeAbstract $html = getSimpleHTMLDOM($url); $element = $html->find('[class*=ComicImage]', 0); - if(!$element) { + if (!$element) { break; // skip, if element was not found } $date = $element->find('[class^=Author__Right] p', 0)->plaintext; diff --git a/bridges/WaggaCouncilBridge.php b/bridges/WaggaCouncilBridge.php index a5b73392..d56277cd 100644 --- a/bridges/WaggaCouncilBridge.php +++ b/bridges/WaggaCouncilBridge.php @@ -1,6 +1,7 @@ getInput('section') ?: 'council'; return urljoin(self::URI, $section); } - public function collectData(): void { + public function collectData(): void + { $html = getSimpleHTMLDOM($this->getURI()); foreach ($html->find('div.container') as $container) { @@ -64,18 +67,18 @@ class WaggaCouncilBridge extends BridgeAbstract { '.article__badge', 'p.text-muted', ]; - + foreach ($selectorsToRemove as $sel) { foreach ($article->find($sel) as $el) { $el->outertext = ''; } } - + foreach ($article->find('iframe') as $iframe) { $src = $iframe->getAttribute('src'); $iframe->outertext = '

Embedded content: ' . htmlspecialchars($src) . '

'; } - + // Enhance list rendering foreach ($article->find('ul') as $ul) { $ul->style = 'margin-left: 1em; padding-left: 1em;';