fix(vice): news rss changed (#3694)

* fix: typo in prior commit

* fix(vice): news rss changed
This commit is contained in:
Dag 2023-09-23 20:39:02 +02:00 committed by GitHub
parent bab02bf190
commit 0c69148cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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.