fix: php notices (#3482)

* fix(furaffinity): notice

* fox(releases3ds): remove references to non-existing vars
This commit is contained in:
Dag 2023-07-03 10:48:33 +02:00 committed by GitHub
parent d8bc015efc
commit 48385777b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View file

@ -900,10 +900,16 @@ class FurAffinityBridge extends BridgeAbstract
$submissionHTML = $this->getFASimpleHTMLDOM($submissionURL, $cache);
$stats = $submissionHTML->find('.stats-container', 0);
$item['timestamp'] = strtotime($stats->find('.popup_date', 0)->title);
$item['enclosures'] = [
$submissionHTML->find('.actions a[href^=https://d.facdn]', 0)->href
];
$popupDate = $stats->find('.popup_date', 0);
if ($popupDate) {
$item['timestamp'] = strtotime($popupDate->title);
}
$var = $submissionHTML->find('.actions a[href^=https://d.facdn]', 0);
if ($var) {
$item['enclosures'] = [$var->href];
}
foreach ($stats->find('#keywords a') as $keyword) {
$item['categories'][] = $keyword->plaintext;
}

View file

@ -82,10 +82,10 @@ class Releases3DSBridge extends BridgeAbstract
$item = [];
$item['title'] = $name;
$item['author'] = $publisher;
$item['timestamp'] = $ignDate;
$item['enclosures'] = [$ignCoverArt];
//$item['timestamp'] = $ignDate;
//$item['enclosures'] = [$ignCoverArt];
$item['uri'] = empty($ignLink) ? $searchLinkDuckDuckGo : $ignLink;
$item['content'] = $ignDescription . $releaseDescription . $releaseSearchLinks;
$item['content'] = $releaseDescription . $releaseSearchLinks;
$this->items[] = $item;
$limit++;
}