17/01/2017

Non-3D Python exercise: Instaload

Well, this is not related to 3D or CG, but it’s Python!

Was bored one day, and had to download a couple of images from instagram. dinsta.com is great, but it only allows you download images, and only one by one. So, I spent a few hours writing a little web-app to download multiple images and even videos from instagram. So, here it is:

http://ift.tt/2j2DSDz

Using it is simple. Just open required instagram photos or images on your pc, copy and paste links into the app, each link on a separate line, and click download button. You should then see download progress, and in the end you’ll get a download link for your zip archive with downloaded files. It will be there for an hour. Heroku has a limit of 300MB of disk space, so this app is not ready for heavy production use because of that limitation, if it somehow becomes popular, I’ll have to move it somewhere else, or change the logic to, for example, use some file sharing service to upload files instead…

Just deployed it on heroku, and I’ll be honest – deployment was the hardest part! I already had a lot of experience with Python, Flask and socketio programming, while writing my own personal home assistant. But my little AI friend is running on my local network, and I had no need to even try to run it on production server, flask’s built in test server works perfectly fine for this.

But with heroku I had to switch to gunicorn, and here comes the fun part – you have to use gunicorn 18.0, not 19.x, as, in fact, stated in the docs: http://ift.tt/2jZ7iXq but it’s easy to miss.

 



Copied from my site's blog: http://ift.tt/2j2BGvE

No comments:

Post a Comment