mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 22:00:23 +02:00
refactor: more feed parsing tweaks (#3748)
This commit is contained in:
@@ -22,6 +22,11 @@ abstract class FeedExpander extends BridgeAbstract
|
||||
if ($xmlString === '') {
|
||||
throw new \Exception(sprintf('Unable to parse xml from `%s` because we got the empty string', $url), 10);
|
||||
}
|
||||
// prepare/massage the xml to make it more acceptable
|
||||
$badStrings = [
|
||||
'»',
|
||||
];
|
||||
$xmlString = str_replace($badStrings, '', $xmlString);
|
||||
$feedParser = new FeedParser();
|
||||
$this->feed = $feedParser->parseFeed($xmlString);
|
||||
$items = array_slice($this->feed['items'], 0, $maxItems);
|
||||
|
Reference in New Issue
Block a user