Skip to content

This is the source code of a simple website for showing various cat pictures/videos people have posted on reddit and which members have upvoted

Notifications You must be signed in to change notification settings

lrmn7/randomcats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation





This is the source code of a simple website for showing various cat pictures/videos people have posted on reddit and which members have upvoted. How it works is that a python script (gen.py) scrapes various cat posts in these cat subreddits, and stores all the data in a JSON file called files.json. This contains information about the post ID, link to the post, number of upvotes, username of OP, etc. Then in /random, script.js chooses a random image/video from the scraped data and displays it on the page. The various endpoints available are:


/

Homepage. Contains an inroduction to the site as well as links to other resources/webpages

/random

The main highlight of the site, shows a random cat image/video upon visiting/reloading the page

/stats

Contains various statistics about the scraped data (such as distribution of upvotes and domains) in the form of interactive graphs

/files.json

Contains all the scraped data in a human readable JSON format

/files.min.json

Contains the scraped data in a minified way, is almost 4x smaller than files.json

About

This is the source code of a simple website for showing various cat pictures/videos people have posted on reddit and which members have upvoted

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages