Sorry

This feed does not validate.

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://www.ffvoile.net/ffv/web/actualites/rss/rss_edf.asp

  1. <script>
  2.  
  3. const express = require('express');
  4. const fetch = require('node-fetch');
  5. const RSS = require('rss');
  6.  
  7. const app = express();
  8.  
  9. app.get('/rss', async (req, res) => {
  10.  try {
  11.    const response = await fetch('https://umbraco.ffvoile.fr/articles/', {
  12.      method: 'POST',
  13.      headers: {
  14.        'Content-Type': 'application/json',
  15.      },
  16.      body: JSON.stringify({
  17.        tags: ['tout'],
  18.        page: 1, // Mettez ici le numéro de page souhaité
  19.        quantity: 12,
  20.      }),
  21.    });
  22.  
  23.    const articles = await response.json();
  24.  
  25.    const feed = new RSS({
  26.      title: 'Votre Titre RSS',
  27.      description: 'Description de votre flux RSS',
  28.      feed_url: 'https://www.ffvoile.fr/ffv/web/actualites/rss/', // Lien vers votre flux RSS
  29.    });
  30.  
  31.    articles.results.forEach((record) => {
  32.      feed.item({
  33.        title: record.title,
  34.        description: record.excerpt,
  35.        url: `http://votresite.com/actus_detail.asp?ID=${record.id}`,
  36.        date: new Date(record.date),
  37.      });
  38.    });
  39.  
  40.    const rss = feed.xml({ indent: true });
  41.    res.set('Content-Type', 'text/xml');
  42.    res.send(rss);
  43.  } catch (error) {
  44.    console.error('Erreur :', error);
  45.    res.status(500).send('Erreur lors de la génération du flux RSS');
  46.  }
  47. });
  48.  
  49. app.listen(3000, () => {
  50.  console.log('Serveur démarré sur le port 3000');
  51. });
  52.  
  53. </script>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda