Roughly one year after building @concinnus for Twitter, I decided it would be a good idea to implement a port for Instagram. I have never been a big fan of the latter, but it is difficult to deny that, of all networks, it’s probably the best target for publishing the kind of content Concinnus publishes — abstract GIFs.
Besides, I had never had the chance to play with the Instagram API, so it seemed like a good opportunity to also learn something new.
Since I already had the core logic of the bot implemented, it seemed like the task would reduce to adding a new channel of distribution. However, as soon as I started experimenting, the following limitations started to show:
- Instagram only allows to upload images and videos, but not GIFs.
- Converting GIFs to videos required the use of CPU-intensive tools that my Bluehost shared-hosting plan did not support or allow.
- No good libraries for Instagram existed for Python 2.7, which I was forced to use on the shared hosting.
With this, it became obvious that I would have to find a workaround for these limitations, and execute the Instagram bot in a server with higher performance.
I contracted the cheapest VPS I could find (offered by OVH), and I set up the basic tools I normally use (Python, pip, etc).
Continue reading “Porting @concinnus to Instagram”