{"id":20029333,"url":"https://github.com/lrmn7/randomcats","last_synced_at":"2025-10-08T10:49:56.577Z","repository":{"id":231943264,"uuid":"685426384","full_name":"lrmn7/randomcats","owner":"lrmn7","description":"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","archived":false,"fork":false,"pushed_at":"2023-08-31T07:49:50.000Z","size":1192,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T22:38:02.290Z","etag":null,"topics":["cat","cats","random-cat"],"latest_commit_sha":null,"homepage":"http://lrmn.is-a.dev/randomcats/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lrmn7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-31T07:49:04.000Z","updated_at":"2023-09-17T10:15:22.000Z","dependencies_parsed_at":"2024-04-07T01:24:36.166Z","dependency_job_id":"241a53c7-79a2-494e-95bc-95a3ad17fe29","html_url":"https://github.com/lrmn7/randomcats","commit_stats":null,"previous_names":["lrmn7/randomcats"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrmn7%2Frandomcats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrmn7%2Frandomcats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrmn7%2Frandomcats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lrmn7%2Frandomcats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lrmn7","download_url":"https://codeload.github.com/lrmn7/randomcats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224420549,"owners_count":17308183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cat","cats","random-cat"],"created_at":"2024-11-13T09:19:42.205Z","updated_at":"2025-10-08T10:49:52.853Z","avatar_url":"https://github.com/lrmn7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- \u003chtml\u003e\n\n\u003cstyle\u003e\n    #button {\n        font-size: 2.5em;\n        color: #fca311;\n        background-color: #24252a;\n        text-align: center;\n        padding: 0.4em;\n        text-decoration: none;\n\n        font-family: 'Comfortaa';\n        font-weight: 700;\n        letter-spacing: 0.09em;\n\n        border-radius: 13px;\n        border-width: 3px;\n        border-style: solid;\n        border-top-color:    rgb(229, 229, 229);\n        border-left-color:   rgb(229, 229, 229);\n        border-right-color:  rgb(105, 105, 105);\n        border-bottom-color: rgb(105, 105, 105);\n        transition: 0.5s;\n    }\n\u003c/style\u003e\n\n\u003ccenter\u003e\n    \u003cdiv id=\"button\"\u003e\n        Random Cat\n    \u003c/div\u003e\n\u003c/center\u003e\n\n\u003c/html\u003e --\u003e\n\n\n\u003c!-- \u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"button.svg\"\u003e\n\u003c/div\u003e --\u003e\n\n\n\u003cdiv align='center'\u003e\n    \u003ca href='https://lrmn.is-a.dev/randomcats' target='_blank'\u003e\n        \u003cimg src=\"assets/button.png\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\nThis is the source code of a simple [website](https://lrmn.is-a.dev/randomcats) 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](https://github.com/lrmn7/randomcats/blob/main/gen.py)) scrapes various cat posts in [these](https://github.com/msr8/cats/blob/main/subreddits.md) cat subreddits, and stores all the data in a JSON file called [files.json](https://github.com/lrmn7/randomcats/blob/main/docs/files.json). This contains information about the post ID, link to the post, number of upvotes, username of OP, etc. Then in [/random](lrmn.is-a.dev/randomcats/random), [script.js](https://github.com/lrmn7/randomcats/blob/main/docs/random/script.json) chooses a random image/video from the scraped data and displays it on the page. The various endpoints available are:\n\n\u003cbr\u003e\n\n## /\nHomepage. Contains an inroduction to the site as well as links to other resources/webpages\n\n## /random\nThe main highlight of the site, shows a random cat image/video upon visiting/reloading the page\n\n## /stats\nContains various statistics about the scraped data (such as distribution of upvotes and domains) in the form of interactive graphs\n\n## /files.json\nContains all the scraped data in a human readable JSON format\n\n## /files.min.json\nContains the scraped data in a minified way, is almost 4x smaller than files.json","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrmn7%2Frandomcats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flrmn7%2Frandomcats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flrmn7%2Frandomcats/lists"}