This website doesn’t have an API, so I made my own, with extra features.

The poet_this twitter bot I made, used to use selenium to extract tweets from https://poet.so (literally going to the website, pasting link, taking a screenshot 💀)

This had several, several issues:

Very costly to host
Inefficient by design
Slow
High…


This content originally appeared on DEV Community and was authored by Dhravya

The poet_this twitter bot I made, used to use selenium to extract tweets from https://poet.so (literally going to the website, pasting link, taking a screenshot 💀)

This had several, several issues:

  • Very costly to host
  • Inefficient by design
  • Slow
  • Highly prone to errors and crashes

It was time to change this.

So I went ahead and created :

  • a python script that uses the Python Image Library to generate the image. This was quite challenging, because I had to (very painfully) plot stuff pixel-by-pixel, and also had to ensure that the tweet fits in the box (for which, I made my own trick where I vertically expanded the image, I'll write a bigger blog explaining the code)
  • An API that anyone and everyone can use
  • A frontend for the API
  • An overall framework, that works for twitter stuff for now, but I'll also be able to implement the same for reddit posts (and comments), etc. you get the point

It was a lot of hassle to make things like mentions, hashtags, and link appear in blue color, media support, and the replies, but I did it!

You can visit the website here - https://beautify.dhravya.dev

To use it instantly on any tweet, mention @poet_this
So yeah, it's time to change the name from poet_this to beautify_this lol

"But isn't this the same as poet.so?"
Well, it is for the most part, but I've also added (a very few, but important) extra features like replies showing up with a preview of the original tweet, with the website doesn't have.
Replies show up like this.

I also think that my updated design is better

also, THANK YOU SO MUCH for showing so much love on the last post. Because of your support, I got a 50$ forem shop voucher. Even though I'll be unable to afford the shipping costs, it means a lot to me to just receive the voucher.


This content originally appeared on DEV Community and was authored by Dhravya


Print Share Comment Cite Upload Translate Updates
APA

Dhravya | Sciencx (2022-05-06T13:14:54+00:00) This website doesn’t have an API, so I made my own, with extra features.. Retrieved from https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/

MLA
" » This website doesn’t have an API, so I made my own, with extra features.." Dhravya | Sciencx - Friday May 6, 2022, https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/
HARVARD
Dhravya | Sciencx Friday May 6, 2022 » This website doesn’t have an API, so I made my own, with extra features.., viewed ,<https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/>
VANCOUVER
Dhravya | Sciencx - » This website doesn’t have an API, so I made my own, with extra features.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/
CHICAGO
" » This website doesn’t have an API, so I made my own, with extra features.." Dhravya | Sciencx - Accessed . https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/
IEEE
" » This website doesn’t have an API, so I made my own, with extra features.." Dhravya | Sciencx [Online]. Available: https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/. [Accessed: ]
rf:citation
» This website doesn’t have an API, so I made my own, with extra features. | Dhravya | Sciencx | https://www.scien.cx/2022/05/06/this-website-doesnt-have-an-api-so-i-made-my-own-with-extra-features/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.