Skip to main content

Python library and cli used to upload photo on Instagram. W/o a phone!

Project description

instapy-cli :zap:

Publish photos and videos (NEW!) on Instagram, without a phone! You can upload posts and even stories on instagram. You can upload a local file or use a link, it does everything for you automagically.

instapy-cli instagram-private-api


Build Status instapy-cli version Build Status MIT license

GitHub issues GitHub forks GitHub stars

Introduction

There are plenty of libraries written in Python specialized on working on Instagram APIs (either public or private), but most of them have lots of unsolved issues and PRs not maintained for a long time.

Lots of developers want a simple and effective way to upload photos or videos (NEW!) directly to Instagram programmatically. Some may want to publish a simple post, others want to publish a story.

All this can be achieved with instapy-cli. :tada:

I dedided to start this repo and open-source it with :heart:

Installation

pip install instapy-cli

Usage

Use as Library

You can check the folder examples to see working codes to use instapy-cli programmatically. If you want to use instapy-cli via shell continue reading.

Use as CLI

Use

instapy -u USR -p PSW -f FILE/LINK -t 'TEXT CAPTION'

Help

instapy --help

Hint

Cookie You can avoid to re-login, by using a cookie that instapy-cli generate for you. By default instapy-cli use the cookie created in current working directory with the name 'USERNAME_ig.json'. If you don't want to store the cookie in your filesystem you need to pass the parameter cookie:

with client(username, password, cookie) as cli:
    # do stuffs with cli

This is feature is not well tested, be carefull using it.

Image Format instapy-cli support images in the format of JPG/JPEG/PNG.

Aspect Ratio The images need to have an aspect ratio of 1:1, that is squared size. You can use other aspect-ratio other than 1:1, but be carefull to stay inside Instagram limits. Otherwise, if you don't respect the aspect ratio, the media will be posted but stretched or cropped.

Why instapy-cli?

First, long story short: instapy-cli is a fork of pynstagram, with the aim of extending its functionality and fixing all unresolved bugs.

Move this project to a better place :arrow_right_hook:

Anyone that wants to collaborate, I promise to be a good repo manager and merge all your pull requests as soon as possible. I have some ideas to improve this but I need collaboration. Join and support! :bulb:

But, wait! Instagram doesn't allow uploading content except from the app (of course :trollface:)

Short answer:

Yes, you are right.

Long answer:

Every connection from a mobile phone could be intercepted. Someone has done the hard work to sniff the packets sent from the phone to Instagram and "spread the news". You can do a quick research.

Code Requirements

This packages will be installed automatically with instapy-cli

package Source Link
requests https://github.com/requests/requests
filetype https://github.com/h2non/filetype.py
instagram-private-api https://github.com/ping/instagram_private_api
instagram-private-api-extensions https://github.com/ping/instagram_private_api_extensions

Contribute

To help instapy-cli developers to build and maintain this project, go to docs/CONTRIBUTING.md

instructions soon

(Write it and collaborate! :wink:)

License

MIT

Support the project and the author

Offer me a coffe or a beer and support instapy-cli. :tada:

Click the button here > Build Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instapy-cli-0.0.10.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instapy_cli-0.0.10-py2.py3-none-any.whl (8.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file instapy-cli-0.0.10.tar.gz.

File metadata

  • Download URL: instapy-cli-0.0.10.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for instapy-cli-0.0.10.tar.gz
Algorithm Hash digest
SHA256 54cae8be2c8a0303531cf4a6420429474c4464ef487d9bac54f954fe42c32355
MD5 953405d36c4bf950cce1b57440813522
BLAKE2b-256 64ad33420bf4918de30e9103ca2f8b8aacae3b8e93709cceba1465e9c482004f

See more details on using hashes here.

File details

Details for the file instapy_cli-0.0.10-py2.py3-none-any.whl.

File metadata

  • Download URL: instapy_cli-0.0.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for instapy_cli-0.0.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ade056877aef29072c1a5250f7f6ad3f5f6e8a67eb01bc118bc887fc35e4ded
MD5 db5e3be8949d54a6cf5f0925859464c0
BLAKE2b-256 338a1b6fc4c90b50b570daa1eb416cbd65c8c81e6769333bfdd1d8dfce081e1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page