list debugging
This commit is contained in:
2
bot.js
2
bot.js
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user