How I created a bot for telegrams InstantViewBot
http://127.0.0.1:8080/tHello everyone, I'm Albert and I always want to improve everything.
In 2014, having moved to St. Petersburg, I decided to start developing myself and decided to start reading articles on the Internet.
There will be a fascinating story about the creation of a telegram bot for reading articles that:
installed 40 thousand times
already processed more than 3 million pages
without advertising, moms, dads, SMS and registration
Immediately there were problems with this:
- articles appeared faster than I could read
- It's not convenient to read on your phone
- need constant internet
- the browser didn't remember where I stopped reading
- there was no “read later” list where I could put the article
I thought it would be cool to solve these problems and I started Googling.
Android application2016 year
I found an open source project, here is the link Telegram launched the InstantView feature
Telegram launched a feature for saving and conveniently reading articles from the Internet, but at first it worked poorly:
- it was necessary to create templates for each site
- not all sites were supported
- It seems large articles were not supported
The result is a convenient format in the InstantView reading cart, remember this format, now we will talk about this format.
InstantView is the most comfortable way to read articles in your favorite messenger, I think about the life hack, you know, create a group for yourself and now you have a list of articles ready for future reading.
Telegram reader botI found a bot ( Free website to launch a bot
There was no money, everything was done on ambition.
I Googled a free database service and a website where you can launch your bot.
Everything was okay with the database. Free MongoDB Cloud, by the way, this service also left the Russian Federation. Now everything is paid, no startups for you.
But there were some problems with the site. It was necessary to periodically “wake up” the server because it was switched off due to downtime.
I found a site that periodically wakes him up.
Later, this site introduced a paid subscription to keep the servers running all the time; I had to pay 10 bucks a month.
Load growthI spent money only on the server, no advertising. The bot began to gain momentum. Nobody argues about its usefulness. People began to send each other a link to the bot and read articles. A heavy load began and the server could no longer cope; it began to crash too often.
The server crashed because at one point too many were sent to it and it did not have time to process the messages.
I went to Google again and found the free message queue service cloudamqp. This is exactly what I need.
I added a queue, and now the bot processes 1 message from the queue. As a result, all users are waiting, but will wait for processing and InstantView
Moeno to exhale and relax.
The oracle company has launched a free eternal server for the whole world for all sorts of experiments and micro-startups.
Of course, I moved there and that’s it. The bot required a minimum of edits, only bugs appeared periodically.
The service left the Russian Federation in 2022. Now in the Russian Federation everything is paid and expensive, no startups for you
The code is open - https://github.com/albertincx/formatbot1
The bot itself is located at https://t.me/CorsaBot
If you need advertising in a bot, please contact https://t.me/safiullin