diff --git a/src/api/api.js b/src/api/api.js index 9462ebd..7121bb2 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -13,7 +13,7 @@ const { } = require('../utils/index'); const { - BASE_ANIMEFLV, BASE_ANIMEFLV_JELU, BASE_JIKAN, BASE_IVOOX, BASE_KUDASAI, BASE_PALOMITRON + BASE_ANIMEFLV, BASE_ANIMEFLV_JELU, BASE_JIKAN, BASE_IVOOX, BASE_KUDASAI, BASE_PALOMITRON, BASE_RAMENPARADOS } = require('./urls'); const schedule = async (day) =>{ @@ -150,6 +150,21 @@ const getNews = async () =>{ }); + await rss.load(BASE_RAMENPARADOS).then(rss => { + + const body = JSON.parse(JSON.stringify(rss, null, 3)).items + body.map(doc =>{ + console.log(doc) + promises.push({ + title: doc.title, + url: doc.link, + author: 'Ramen para dos', + content: doc.content + }); + }); + + }); + return Promise.all(promises); }; diff --git a/src/api/routes/index.js b/src/api/routes/index.js index e80afdf..5eea8e8 100644 --- a/src/api/routes/index.js +++ b/src/api/routes/index.js @@ -172,10 +172,11 @@ router.get('/moreInfo/:title' , (req, res) =>{ api.getMoreInfo(title) .then(info =>{ + console.log(info) if (info.length > 0) { - res.status(200).json( - JSON.parse(JSON.stringify(info[0])) - ); + res.status(200).json({ + info: info + }); } else { res.status(400) } }).catch((err) =>{ console.error(err); diff --git a/src/api/urls.js b/src/api/urls.js index e453d4b..8b897b5 100644 --- a/src/api/urls.js +++ b/src/api/urls.js @@ -5,6 +5,7 @@ module.exports = { BASE_IVOOX: 'https://www.ivoox.com/podcast-anitakume_fg_f1660716_filtro_1.xml', BASE_KUDASAI: 'https://somoskudasai.com/feed/', BASE_PALOMITRON: 'https://elpalomitron.com/category/animemanga/feed/', + BASE_RAMENPARADOS: 'https://ramenparados.com/category/noticias/anime/feed/', SEARCH_URL: 'https://animeflv.net/browse?q=', BASE_EPISODE_IMG_URL: 'https://cdn.animeflv.net/screenshots/' }; \ No newline at end of file