Skip to content

jakeslye/reddit-image-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Reddit Image Scraper

Javascript reddit scraper in one function

getRedditImages(amount, subreddit, callback)

Example Usage

<script src="reddit.js"></script>
<style>
    img{
        width: 25%;
        height: 25%;
    }
</style>
<script>
    getRedditImages(15, "nature", (images) => {
        for(var i=0; i<images.length; i++){
            if(images[i] != "no image"){
                var image = document.createElement("img");
                image.src = images[i];
                document.body.appendChild(image);
            }
        }
    });
</script>

About

Javascript reddit scraper in one function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published