We read telegram channels in the form of a news feed (+ bonus rss)

Background and issues

When I switched from VK to Telegram, choosing the latter as the main messenger, I encountered a number of inconveniences: the cart does not have the usual news feed and all content must be collected through channels. VK has the functionality of groups (messages from which are collected in the feed), but I was always infuriated by the presence of explicit advertising, advertising posts and other garbage that I did not want to see in the feed.





At one time, when VK began to shove its recommendations into the feed (they cannot be switched off at all), I used adblock, alternative android clients (kate mobile), but all these half measures were straining.





In the cart, as soon as the number of channels increased, the need to go into each was very strained. And when there were about 30 of them, I began to score on some, because tired of moving back and forth on them.





Plus, all of a sudden, many channels started spamming with cross-links with ads. And okay, if these are affiliate posts from similar channels. More often it was all sorts of English courses, python, and sometimes even a scam about a casino or a crypt.





Idea and implementation

This is how the idea arose to create an aggregator of telegram channels with filtering by keywords (which are often found in advertising posts).





I'm aware of the channel grouping functionality in some clients, but for some reason it doesn't suit me:





  • grouping only works at the client level. Those. channels grouped in the mobile application will not be grouped in the web version or other client





  • it is impossible (at least I did not find) to group chats and channels





  • filtering of spam and ads is not available





  • I was going to export the aggregated content to rss (more on that in the second part of the article)





After googling the existing tools for working with the cart, I settled on the python telethon library. Its key feature was the ability to work in client mode, not a bot (more on this below, in the nuances).





What else is the hood:
  • telethon as a telegram client





  • asyncio for async





  • peewee and sqlite3 to store information about who subscribed to what.





Posts from subscriptions themselves are not saved, they are sent on the fly





: , .





, . , :





  1. ( 5-7 ), , / ( , feed).





  2. .1, ( .. ), . , , .. . telethon' . .. telethon- . , , , , , . , .





  3. .2, ( ) ( , ). - . .





  4. , , ( ), mvp.





?

:





  1. ( -, ), .





  2. ( ), ()





  3. (@telegregator) ( ).





  4. .





  5. /join @_ (. .1), . , ( , 50 ).





  6. , .





  7. .





. ( , - - ).





: , , . , 5-10 . ( ), - . , .





, . - .





:









  • ( , )









. , 200, , .





- , , - . , , .





, .





- ?

, :

, , , , . . - .





, RSS

RSS-. , .. , rss, . - : rss . . - , , , .





rss , :





  • http://feed.exileed.com/





  • https://rsshub.app/telegram/channel/temablog





:













  • (, , )





  • ( )





, telegram->rss. , -, ( ) rss-. , , . , . : http://tg2rss.prosto-tak.ru/.





For questions or comments, you can write here in PM, in the cart @parotikov or at nik.parotikov@gmail.com.





PS In "I'm PR" there is not enough karma. There is no hub for telegram at all, strange.








All Articles