Added Ramen Para Dos Feed

pull/1/head
Jéluchu 5 years ago
parent 62121cbc53
commit b0c0c61ff3

@ -13,7 +13,7 @@ const {
} = require('../utils/index'); } = require('../utils/index');
const { 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'); } = require('./urls');
const schedule = async (day) =>{ 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); return Promise.all(promises);
}; };

@ -172,10 +172,11 @@ router.get('/moreInfo/:title' , (req, res) =>{
api.getMoreInfo(title) api.getMoreInfo(title)
.then(info =>{ .then(info =>{
console.log(info)
if (info.length > 0) { if (info.length > 0) {
res.status(200).json( res.status(200).json({
JSON.parse(JSON.stringify(info[0])) info: info
); });
} else { res.status(400) } } else { res.status(400) }
}).catch((err) =>{ }).catch((err) =>{
console.error(err); console.error(err);

@ -5,6 +5,7 @@ module.exports = {
BASE_IVOOX: 'https://www.ivoox.com/podcast-anitakume_fg_f1660716_filtro_1.xml', BASE_IVOOX: 'https://www.ivoox.com/podcast-anitakume_fg_f1660716_filtro_1.xml',
BASE_KUDASAI: 'https://somoskudasai.com/feed/', BASE_KUDASAI: 'https://somoskudasai.com/feed/',
BASE_PALOMITRON: 'https://elpalomitron.com/category/animemanga/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=', SEARCH_URL: 'https://animeflv.net/browse?q=',
BASE_EPISODE_IMG_URL: 'https://cdn.animeflv.net/screenshots/' BASE_EPISODE_IMG_URL: 'https://cdn.animeflv.net/screenshots/'
}; };
Loading…
Cancel
Save