summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/Scraper/Scraper.php7
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ff2d1c05..061ad1475 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1
### Changed
### Fixed
+- SyntaxError triggered when full-text is enabled with some items. (#2048, #2053)
# Releases
## [20.0.0] - 2022-12-14
diff --git a/lib/Scraper/Scraper.php b/lib/Scraper/Scraper.php
index 5deac358e..998c4464c 100644
--- a/lib/Scraper/Scraper.php
+++ b/lib/Scraper/Scraper.php
@@ -14,6 +14,7 @@ namespace OCA\News\Scraper;
use fivefilters\Readability\Readability;
use fivefilters\Readability\Configuration;
use fivefilters\Readability\ParseException;
+use League\Uri\Exceptions\SyntaxError;
use Psr\Log\LoggerInterface;
class Scraper implements IScraper
@@ -74,10 +75,14 @@ class Scraper implements IScraper
try {
$this->readability->parse($content);
- } catch (ParseException $e) {
+ } catch (ParseException | SyntaxError $e) {
$this->logger->error('Unable to parse content from {url}', [
'url' => $url,
]);
+ $this->logger->debug('Error during parsing of {url} ran into {error}', [
+ 'url' => $url,
+ 'error' => $e,
+ ]);
}
return true;
}