Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wasdennnoch/reddit-anti-gif-bot
A Reddit bot providing an mp4 link/mirror for gif submissions
https://github.com/wasdennnoch/reddit-anti-gif-bot
bot gfycat gif reddit reddit-bot
Last synced: about 2 months ago
JSON representation
A Reddit bot providing an mp4 link/mirror for gif submissions
- Host: GitHub
- URL: https://github.com/wasdennnoch/reddit-anti-gif-bot
- Owner: wasdennnoch
- Archived: true
- Created: 2017-04-16T13:23:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-19T18:59:35.000Z (over 5 years ago)
- Last Synced: 2024-05-22T04:37:10.043Z (4 months ago)
- Topics: bot, gfycat, gif, reddit, reddit-bot
- Language: JavaScript
- Homepage:
- Size: 355 KB
- Stars: 177
- Watchers: 9
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reddit-anti-gif-bot
The source of [u/anti-gif-bot](https://reddit.com/u/anti-gif-bot), a bot which provides an mp4
link/mirror for gif submissions.You can find an FAQ here: https://reddit.com/r/anti_gif_bot/wiki/index
## How it works
Some technical stuff; this bot is written in JavaScript and runs on Node.js. It uses the
library [snoowrap](https://github.com/not-an-aardvark/snoowrap) for every interaction with
Reddit and the official [gfycat-sdk](https://github.com/gfycat/gfycat-sdk) to upload to gfycat.
Every 15 seconds the bot fetches /r/all/new to get the newest submissions and filters all
gif submissions. If the gif domain is known for providing an mp4 version the gif url gets
converted to an mp4 link, otherwise a request to gfycat is made containing the gif url.
After an mp4 link is generated (or gfycat is done converting the gif) a reply containing that
link gets posted. That's it basically. There are a few more things such as a domain blacklist
(the gifv-bot already covers gifs from imgur) and an internal stats counter that keeps track
of the amount of submissions the bot scraped, the amount of gifs, domains that host gifs etc.
Maybe I'll eventually create a website where I make these stats available. Until then I'll
keep them private (well, I accidentally committed a dev version once but whatever, it's no secret)
to enhance the bot and for my own curiosity.## Contribution
If you find any bugs or want to submit an enhancement feel free to open an issue or
submit a pull request and I'll look into it!