list debugging

This commit is contained in:
Dalton
2018-12-12 20:34:41 -08:00
parent e564d2b94d
commit b7706cd72d

2
bot.js
View File

@@ -192,7 +192,9 @@ function getUrlListFromReddit(json) {
let url_list = []; let url_list = [];
for (let i = 0; i < json.data.children.length; i++) { for (let i = 0; i < json.data.children.length; 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") { 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');
url_list.push(json.data.children[i].data.url); url_list.push(json.data.children[i].data.url);
} }
} }