diff options
| author | 2022-03-21 12:51:41 +0100 | |
|---|---|---|
| committer | 2022-03-21 12:51:41 +0100 | |
| commit | 4363e13c342e4e47e14ce3ca74fbc707dc1f891d (patch) | |
| tree | 47b6d2fdebbb68fbe55d179ee4ccce9de71cb132 /app/Controllers | |
| parent | 6f018cc674fe049ba49ebf4d89ab386bc29a9327 (diff) | |
Set feed error state when XPath does not match (#4275)
Gives the ability to filter HTML+XPath feeds that are not working
Diffstat (limited to 'app/Controllers')
| -rwxr-xr-x | app/Controllers/feedController.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index dabfb348f..0d1cd3230 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -375,6 +375,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $simplePie = $simplePiePush; //Used by WebSub } elseif ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH) { $simplePie = $feed->loadHtmlXpath(false, $isNewFeed); + if ($simplePie == null) { + throw new FreshRSS_Feed_Exception('HTML+XPath Web scraping failed for [' . $feed->url(false) . ']'); + } } else { $simplePie = $feed->load(false, $isNewFeed); } |
