1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 08:07:33 +02:00
This commit is contained in:
Dag
2025-08-04 01:36:15 +02:00
committed by GitHub
parent 47c9983e16
commit e5f9fe6251
2 changed files with 10 additions and 7 deletions

View File

@@ -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;

View File

@@ -1,6 +1,7 @@
<?php
class WaggaCouncilBridge extends BridgeAbstract {
class WaggaCouncilBridge extends BridgeAbstract
{
const NAME = 'Wagga Wagga Council';
const URI = 'https://news.wagga.nsw.gov.au/';
const DESCRIPTION = 'Wagga Wagga Council updates';
@@ -25,12 +26,14 @@ class WaggaCouncilBridge extends BridgeAbstract {
]
];
public function getURI(): string {
public function getURI(): string
{
$section = $this->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) {