mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 09:35:28 +03:00
fix(vice): news rss changed (#3694)
* fix: typo in prior commit * fix(vice): news rss changed
This commit is contained in:
parent
bab02bf190
commit
0c69148cff
3 changed files with 8 additions and 3 deletions
|
@ -5,7 +5,7 @@ class ViceBridge extends FeedExpander
|
|||
const MAINTAINER = 'IceWreck';
|
||||
const NAME = 'Vice Bridge';
|
||||
const URI = 'https://www.vice.com/';
|
||||
const CACHE_TIMEOUT = 3600; // This is a news site, so don't cache for more than 10 mins
|
||||
const CACHE_TIMEOUT = 3600;
|
||||
const DESCRIPTION = 'RSS feed for vice publications like Vice News, Munchies, Motherboard, etc.';
|
||||
const PARAMETERS = [ [
|
||||
'feed' => [
|
||||
|
@ -24,6 +24,10 @@ class ViceBridge extends FeedExpander
|
|||
public function collectData()
|
||||
{
|
||||
$feed = $this->getInput('feed');
|
||||
if ($feed === 'rss') {
|
||||
// They changed url in Sep 2023
|
||||
$feed = 'en/rss';
|
||||
}
|
||||
$feedURL = 'https://www.vice.com/' . $feed;
|
||||
$this->collectExpandableDatas($feedURL, 10);
|
||||
}
|
||||
|
|
|
@ -390,7 +390,7 @@ abstract class XPathAbstract extends BridgeAbstract
|
|||
* Should provide the feed's items.
|
||||
*
|
||||
* @param \DOMXPath $xpath
|
||||
* @return \DOMNodeList
|
||||
* @return \DOMNodeList|false
|
||||
*/
|
||||
protected function provideFeedItems(\DOMXPath $xpath)
|
||||
{
|
||||
|
@ -417,6 +417,7 @@ abstract class XPathAbstract extends BridgeAbstract
|
|||
|
||||
$entries = $this->provideFeedItems($xpath);
|
||||
if ($entries === false) {
|
||||
// malformed
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<?php if ($e->getCode() === 429): ?>
|
||||
<h2>429 Try again later</h2>
|
||||
<h2>429 Too Many Requests</h2>
|
||||
<p>
|
||||
RSS-Bridge tried to fetch a website.
|
||||
They told us to try again later.
|
||||
|
|
Loading…
Reference in a new issue