Skip to main content

Python package for sharing on Instagram

Project description

Insta_Share

This project provides you with functions to be able to do the followings:

  • Login into your instagram account and get the csrf_token and session_id by using login_instagram function
  • Use the acquired credentials from output of the mentioned function to share a post into your Instagram account
  • Use the acquired credentials to upload a story

Installation

    pip install requests
    pip install jsonlib
    pip install https://github.com/softcoder24/insta_share/archive/master.zip

Usage

from insta_share import Instagram

insta = Instagram()

session = {
    "csrf_token": "CSRF_TOKEN",
    "session_id": "SESSION_ID"
}

insta.load(session)

with open('toronto.jpg', 'rb') as image:
    share_post = insta.post(image, caption="Lovely City")
    print(share_post)

    story = insta.story(image)
    print(story)

Sample response for share_post:

{'message': 'photo was shared successfully!', 
 'data': {'media': {'taken_at': 1605625037, 'pk': '2444482423770884550', 
    'id': '2444482423770884520_42370920440','device_timestamp': 1605625026, 
    'media_type': 1,
     ...
 'status': 'ok'}}

Sample response for story:

{'message': 'story was shared successfully!', 
    'data': {'media': {'taken_at': 1605625634, 'pk': '2444487375272740605', 
    'id': '2444487375272740603_42370920439', 'device_timestamp': 1605625630,
    'media_type': 1, 
       ...
 'status': 'ok'}}

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

insta_share-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

insta_share-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file insta_share-0.0.1.tar.gz.

File metadata

  • Download URL: insta_share-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for insta_share-0.0.1.tar.gz
Algorithm Hash digest
SHA256 36e718926aa676c71d71fbefc8232ec78147376d501ae9e9b78e0093bf183084
MD5 ac6c7450650dcfc9fec7899aadc18842
BLAKE2b-256 ef29188ed8aca0f3059bdfcdea861df5917d16d6adc30769b476828d9ce5e3a1

See more details on using hashes here.

File details

Details for the file insta_share-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: insta_share-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for insta_share-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16c4006d8eade2122d3f143a40dc4d84946056ee9c11d6e91742ba67dc314841
MD5 a51f4986b2f3cfcf39b590595fb003a5
BLAKE2b-256 627bfa0a7ade10724bd23b4d92595c662863c207823358c737fab02613a74701

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