summaryrefslogtreecommitdiffstats
path: root/lib/Scraper/Scraper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Scraper/Scraper.php')
-rw-r--r--lib/Scraper/Scraper.php7
1 files changed, 6 insertions, 1 deletions
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;
}