[JornalNBridge] cache timeout fix (#3452)

* [JornalNBridge] cache timeout fix

* [JornalNBridge] cache timeout fix
This commit is contained in:
rmscoelho 2023-06-21 10:15:36 +01:00 committed by GitHub
parent 8e35ebf482
commit 12ba6154f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ class JornalNBridge extends BridgeAbstract
const URI = 'https://www.jornaln.pt/';
const DESCRIPTION = 'Returns news from the Portuguese local newspaper Jornal N';
const MAINTAINER = 'rmscoelho';
const CACHE_TIMEOUT = 10;
const CACHE_TIMEOUT = 86400;
const PARAMETERS = [
[
'feed' => [
@ -72,7 +72,7 @@ class JornalNBridge extends BridgeAbstract
public function collectData()
{
$url = sprintf('https://www.jornaln.pt/%s', $this->getInput('feed'));
$dom = getSimpleHTMLDOM($url);
$dom = getSimpleHTMLDOMCached($url);
$domSelector = '.elementor-widget-container > .elementor-posts-container';
$dom = $dom->find($domSelector, 0);
if (!$dom) {