unbrainrot telegram bot (i rhymed)  banner

unbrainrot telegram bot (i rhymed)

10 devlogs
15h 28m 7s

hi!
im a big fan of epik high and kdrama. most of these news/fan sources come from x.
however,
i tend to doom scroll when im on that platform… but i do have news/ sources that i want updates from. im trying to make a telegram bot that retrie…

hi!
im a big fan of epik high and kdrama. most of these news/fan sources come from x.
however,
i tend to doom scroll when im on that platform… but i do have news/ sources that i want updates from. im trying to make a telegram bot that retrieves posts from various users on x and translates tweets to english, since I’m not very good in korean too.

This project uses AI

regular expression help. explanation of different commands and arguments for docker. questions about cloud hosting

Demo Repository

Loading README...

smollcoin

LOL twitter is a little buggy as i am typing this

added a function to access the shelf without calling the api…
i should have used a database. my architecture and how i am placing the data is in…total shambles.
there were some errors so i fixed them too.

i think this project is coming to a close?
pretty satisfied with what i have done though my brain rot on x has been already solved by restricting the website on my phone.
ALSO i did not expect to host or complete this project. so I am a little surprised that i pushed through.

im gonna write the ship thing tomorrow morning… good night

Attachment
0
smollcoin

added a red me

i need to be more professional man this is not it

wait i did not know this supports markdown

Attachment
0
smollcoin

AUTH

im broke, living on FREE TWITTER API credits. and Deepseek to translate. so ummm…. technically its for my own use but i got to ship and present it to some extend

so i created a decorator that ONLY allows ME to change some configurations. hahahaha ok sorry but yes. and… im tired…

Hello
Commands:
/get_acc_list - View all accounts in list
/get_interval - View the current interval
/set - Start automatic Twitter monitoring
/unset - Stop Twitter monitoring
/help for help

Please no
/update - Get the latest twitter update
/add_acc - Add an account
/delete_acc - Delete an account
“””

EDIT:

holy smokes i deployed it but i need someone else to help me test it out

Attachment
0
smollcoin

i feel so cooked hosting is a headache and i have 0 experience im surviving on the mercy of tutorials and i should not have used polling. im feeling very discouraged now…. cries

i should have taken account that i can’t run an instance 24/7 technically i can because of free 90 day google cloud $300 credits thank the heavens but i am. i am upset.

But yes. Images and videos work now.

Attachment
0
smollcoin

ok i realised i may have took a longer way i should have researched more in depth first…
so uhhh i can now add remove view accounts tracked in memory…
and the extraction logic is covered but i still have to find ways to send and display it back to me

it should be easy to call the extraction function since i encapsulated it pretty nicely but we will never know till tmr.. right…

things i need to do:

  1. find a way to display images and videos on tele
  2. orchestrate ts
  3. run on google cloud but idk if the list of accounts, not sure if i need to save it somewhere else… all the worries… but if function then wouldn’t i need to?

someone please advice

Attachment
0
smollcoin

hi… am back…
learnt a little bit of docker from youtube and then i tried to apply it because uhh i think i have to host it? i had to do a lot of research because honestly i don’t know what to do. im also gonna try to deploy it o google cloud using cloud run. hopefully i can get it to work.
downloaded the media from the tweets… i couldn’t get the videos to work only the images sadly. lowkey ripped it off stack overflow LOL… WAIT WAIT WAIT i sliced it wrong omg maybe i can?!! actually!?!?! next devlog…
i was literally jumping for joy when i saw the image at the bottom omg feat. tukutz from epik high

Attachment
0
smollcoin

created a translation class which helps to translate the korean tweets, by passing it into deepseek. yippee !

what’s probably next:

  1. downloading media and attachments
  2. telegram bot thing
Attachment
0
smollcoin

hello i am back…
i refactored my code because it was too spaghetti… now it is in 4 classes instead of 1 file. it took me about 1.5 hours.
the other 2 hours, i explored what the response of the http request was and the response gave a lot of information. tried sieving through it myself, but i found it difficult(?) not sure maybe because its 3 and im sleepy. it was in a python dict but i couldn’t find the key and values and i had a lot of errors. after many failed attempts to do so, i used a little bit of chatgpt to help me find where the information was in. then i implemented shelf.

since it is retrieving the tweets correctly now, my future plans are:

  1. translate the tweets into english since most of them are korean.
  2. from the links, try to download the media
  3. telegram bot which sends all the information to me
Attachment
0
smollcoin

um… at first, i searched for the pricing of x api. and it was really expensive.
then i tried web scraping using playwright and beautiful soup.
however, after digging and trying for an hour, i realise that their anti bot prevention makes it really hard to do so. i had to pivot to other methods.
i browsed the web and saw some free api options, which hopefully can last me the whole of my project.
i decided on using twitterapi.io api. it took me a while to get the advanced search syntax, but i managed to. this is just a simple api retrieval but i am excited on what i can do tomorrow. im not sure what attachment to put since there really isn’t much… uh…

Attachment
0