26-8-2024 12:12
Kinda ironic doing it just before the whole platform might collapse
There is a bot on Telegram called USaver. It can pull media from links sent to it.
But from time to time it gets overloaded with requests (especially during evenings), and becomes rather slow to respond. Which is why I've decided to look into ways of creating a custom bot with similar functionality that I and my friends we could use.
There's a tool called cobalt.tools that is open source, has open API docs that can do pretty much what USaver does, and has an even wider range of platforms that it supports.
(Instagram reels download is currently broken🥲). It even has instructions on how to run in docker! I've tried running it on my server, but unfortunately the server is located in a different country, meaning that there are differences in content available. I'm considering getting a proxy for it, but that's just a thought currently.
Telegram wasn't really able to provide the functionality I was looking for. My idea was to try and make it look like this video was from the user itself.
need to implement "click to enlarge image"
Stack itself was:
During implementation I've faced multiple issues:
Well, I'm pretty sure captions are used if Telegram is not able to retrieve Photo data, but it's more of a hack tbh.
Key takeaways from this is that inline telegram bots api is a bit limited. I'm not really able to come up with reasoning behind it being the way it is other than some security/design intentions, but oh well.
Some experience gained✨, time to move on. (But gotta add a good README to the repo before that)
The impl was quick and dirty, just wanted to toy around with things. Currently, the bot is able to just download video from user's query, upload it to chat, and update the user's message. Still needs some guardrails and better error handling, but eh - I might or might not return to this project. Project repo