Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/operavaria/instant-serotonin
A simple webapp that scrapes the internet for cute animal pictures.
https://github.com/operavaria/instant-serotonin
api capybara flask hedgehog manul memes pexels pixabay python reddit sand-cat unsplash web-app
Last synced: about 13 hours ago
JSON representation
A simple webapp that scrapes the internet for cute animal pictures.
- Host: GitHub
- URL: https://github.com/operavaria/instant-serotonin
- Owner: OperaVaria
- License: gpl-3.0
- Created: 2024-01-27T08:23:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T20:19:27.000Z (4 months ago)
- Last Synced: 2024-07-12T21:31:10.447Z (4 months ago)
- Topics: api, capybara, flask, hedgehog, manul, memes, pexels, pixabay, python, reddit, sand-cat, unsplash, web-app
- Language: Python
- Homepage: https://www.serotonin.fun/
- Size: 1.51 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- License: COPYING.md
Awesome Lists containing this project
README
# Instant Serotonin
This is the source code for a simple web app that scrapes the internet for cute
animal pictures, and displays one at random upon user request.
It is mainly written in Python, utilising the Flask web framework.
The frontend component is a standard HTML-CCS-JS website, with a simple custom styling.## Functionality
A scheduled script (collect_script.py) gathers data from pre-set sources every night,
and stores the information in pickle files (./data/). The raw data is then read when Flask
assembles the requested HTML page, and a random post is selected.Currently scraped sources: Pixabay, Pexels, Unsplash, and thematic subreddits.
The reddit scraping function uses the [PRAW module by Bryce Boe](https://github.com/praw-dev/praw).
Server-side Flask sessions are utilised (via the [Flask-Session extension]( https://github.com/pallets-eco/flask-session))
to avoid sending the same results to the same user multiple times.The HTML-CSS side has a responsive, Flexbox layout. It is optimized to display correctly on all screen types.
## Screenshots
## Other
The currently running version is accessible: **[here](https://www.serotonin.fun/)**.
Sources of the static images used in this project: **[image_sources.md](image_sources.md)**.
Font utilized: [Roboto Light designed by Christian Robertson](https://fonts.google.com/specimen/Roboto).
**[Contact](mailto:[email protected])**
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)