checking list pass
This commit is contained in:
6
bot.js
6
bot.js
@@ -192,12 +192,14 @@ function getUrlListFromReddit(json) {
|
||||
|
||||
let url_list = [];
|
||||
for (let i = 0; i < json.data.children.length; i++) {
|
||||
console.log('reddit result:' + JSON.stringify(json.data.children[i]));
|
||||
//console.log('reddit result:' + JSON.stringify(json.data.children[i]));
|
||||
if (json.data.children[i].data.post_hint === "image" || json.data.children[i].data.post_hint === "link" || json.data.children[i].data.post_hint === "rich:video") {
|
||||
console.log('pushing onto list');
|
||||
//console.log('pushing onto list');
|
||||
url_list.push(json.data.children[i].data.url);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(url_list);
|
||||
return url_list;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user