DEV Community

Cover image for I made a twitter bot to take beautiful screenshots of a tweet

Posted on • Updated on

I made a twitter bot to take beautiful screenshots of a tweet

Often times, after seeing a tweet, I go to to take a screenshot of it. However, this was kinda time consuming and stuff like that, but doesn't even have an API, so I create a selenium script that (very quickly) uses to take screenshots of a tweet.

To use the bot, simply reply to any tweet with @poet_this
Image description

The project is shockingly simple, but super useful. It hardly took 20 minutes for me to make it (because I already had some experiences with the twitter API - auto twitter banner changer )

in fact, it's so simple that this is all I needed to write (with a little bit of reverse engineering of the website and some keyboard tricks)

    def get_poem(self, link, savepath="tweet.png"):
        input_box = self.driver.find_element(by= "tag name", value="input")
        input_box.send_keys(link + u'\ue007')
        element = self.driver.find_element("xpath","//*[@data-export-hide]")

        # Waiting for the image to load
Enter fullscreen mode Exit fullscreen mode

Anyways, I hope you like my little project. If you have any suggestions or issues, feel free to post them on github.
The repository is public here:
Please ⭐ this!

GitHub logo Dhravya / beautify-this-bot

A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by

Poet this!

License: MIT

Replies with a beautiful screenshot of the tweet, powered by
Poet this bot


git clone
cd beautify-this-bot
pip install -r requirements.txt


python src/


This project is licensed under the MIT license

Show your support

Leave a if you like this project

Readme made with 💖 using README Generator by Dhravya Shah

I'm considering options to host the bot too, but hosting anything using selenium is quite the pain so i'll try my best. For now it's online on my own computer

Discussion (11)

designegycreatives profile image

You are super cool 🫂👏🏽

rahulpar profile image
Rahul Parakkat

This is super cool.

renanfranca profile image
Renan Franca

Boy! You are flying 🚀!!! Keep up!

I loved the banner changer with followers! I was looking for something like that 👏

dhravya profile image
Dhravya Author

Thanks! Glad I could help ✨

chadwinjdeysel profile image
Chadwin Deysel

I'll definitely be checking this out, super cool 🙌

rgolawski profile image
Rafał Goławski

Looks great, I really like this glassmorphism design! 👏

full_stack_adi profile image


ben profile image
Ben Halpern

Really nicely done

just_moh_it profile image
Mohit Yadav

Way to go! Nice...

andypiper profile image
Andy Piper

Another cool app, nice work.

shamimularefin profile image
Md Shamimul Arefin

I've already generated and shared photos from it. Absolutely cool!