newv
This commit is contained in:
parent
cfb9d7fd35
commit
574273755c
@ -13,10 +13,10 @@ var db = new db_js("rss_chan");
|
||||
//=== TOOL FUNCTIONS
|
||||
|
||||
const get_rss = function(url,min_id){
|
||||
return parser.parseURL(url).then(feed=>{
|
||||
let idx = feed.findIndex(i => i.prop_1 === min_id);
|
||||
if(idx>=0) return feed.items.slice(0,idx);
|
||||
else return feed.items;
|
||||
return parser.parseURL(url).then(feed=>feed.items).then(items=>{
|
||||
let idx = items.findIndex(i => i.prop_1 === min_id);
|
||||
if(idx>=0) return items.slice(0,idx);
|
||||
else return items;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user