Skip to content

barnybug/python-instagram-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

python-instagram-upload

Upload and post photos to Instagram with Python!

This is inspired and roughly ported from the PHP implementation by Lance Newman.

Usage Example:

filepath = "/tmp/square.jpg"
print "Uploading " + filepath
insta = InstagramSession()
if insta.login(USERNAME, PASSWORD):
    media_id = insta.upload_photo("/tmp/small.jpg")
    print media_id
    if media_id is not None:
        insta.configure_photo(media_id, "")

Note that photos must be square to be uploaded. You can convert your photo using ImageMagick with this command:

convert -define jpeg:size=1280x1280 -resize 640x640^ \
    -extent 640x640 /tmp/original.jpg /tmp/square.jpg

About

Upload and post photos to Instagram with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%