From 003ab585140c0817738df23ddcffe721e64f451a Mon Sep 17 00:00:00 2001 From: Dag Date: Sun, 10 Jul 2022 19:48:37 +0200 Subject: [PATCH] [FurAffinity] fix: errror (#2887) They changed parts of the dom. Fix error: Error: Call to a member function find() on null Fixes #2868 --- bridges/FurAffinityBridge.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bridges/FurAffinityBridge.php b/bridges/FurAffinityBridge.php index 99cbbeb5..6185de87 100644 --- a/bridges/FurAffinityBridge.php +++ b/bridges/FurAffinityBridge.php @@ -914,10 +914,13 @@ class FurAffinityBridge extends BridgeAbstract $imgURL = 'https:' . $previewSrc; } - $description = $submissionHTML - ->find('.maintable .maintable tr td.alt1', -1); - $this->setReferrerPolicy($description); - $description = $description->innertext; + $description = $submissionHTML->find('div.submission-description', 0); + if ($description) { + $this->setReferrerPolicy($description); + $description = trim($description->innertext); + } else { + $description = ''; + } $item['content'] = <<