Package: instapy-cli
instapy-cli:zap:Publishphotosandvideos(NEW!) on Instagram, without a phone! You can uploadpostsand evenstorieson Instagram.
You can upload a local file or use a link, it does everything for you automagically.IntroductionThere 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 Instagramprogrammatically. Some may want to publish a simple post, others want to publish a story.All this can be achieved withinstapy-cli. :tada:I dedided to start this repo and open-source it with :heart:Installationpipinstallinstapy-cliUsageUse as LibraryYou can check the folderexamplesto see working codes to use instapy-cli programmatically.
If you want to use instapy-cli via shell continue reading.Use as CLIUseinstapy-uUSR-pPSW-fFILE/LINK-t'TEXT CAPTION'CLI Optionsoptionrequireddefaultdescription-uyes-username-pyes-password-fyes-file/media to upload-toptional-text caption for post-soptional-upload a storyHelpinstapy--helpHintsCookieYou 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 parametercookie:withclient(username,password,cookie)ascli:# do stuffs with cliThis is feature is not well tested, be carefull using it.Image Formatinstapy-cli support images in the format of JPG/JPEG/PNG.Aspect RatioThe 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 RequirementsThis packages will be installed automatically withinstapy-clipackageSource Linkrequestshttps://github.com/requests/requestsfiletypehttps://github.com/h2non/filetype.pyinstagram-private-apihttps://github.com/ping/instagram_private_apiinstagram-private-api-extensionshttps://github.com/ping/instagram_private_api_extensionsContributeTo helpinstapy-clidevelopers to build and maintain this project, go todocs/CONTRIBUTING.mdinstructions soon(Write it and collaborate! :wink:)LicenseMITSupport the project and the authorOffer me a coffe or a beer and support instapy-cli. :tada:Click the button here >