Automatically Repost Content From Instagram to Twitter
Ever tried sharing an Instagram post to Twitter, only to find out that all you tweeted was a link, and not the actual photo/video?
⚠ Humiliating 🤮 |
|---|
That could be literally anything. Nobody will click it. |
InstaTweet shares the actual content of the post. Not just a link to it.
With InstaTweet, you can rest easy knowing that, although nobody will click the link, they’ll at least see what you posted.
…
What’s InstaTweet?
InstaTweet is a customizable tool to automatically repost content from Instagram to Twitter.
Simply create a Profile, configure the mandatory settings, and add_pages() to repost from
from InstaTweet import Profile
# Create a new (local) Profile
>>> profile = Profile('myProfile')
# Configure the mandatory settings (at minimum)
>>> profile.twitter_keys = twitter_api_keys
>>> profile.session_id = '6011991A'
# Add at least one Instagram page (user/hashtag) to repost from
>>> profile.add_pages(['the.dailykitten', '#thedailykitten'])
# Save the Profile [optional]
>>> profile.save()
Saved Local Profile myProfile
Once configured, the Profile can be used to initialize and start() InstaTweet:
from InstaTweet import InstaTweet
# Directly initialize with a Profile object
>>> insta_tweet = InstaTweet(profile)
# Or load a saved Profile by name
>>> insta_tweet = InstaTweet.load("myProfile")
# Run InstaTweet by calling start()
>>> insta_tweet.start()
As InstaTweet runs, its progress will be logged to console:
Starting InstaTweet for Profile: myProfile
Checking posts from @the.dailykitten
...
Checking posts from #thedailykitten
...
Finished insta-tweeting for #thedailykitten
All pages have been insta-tweeted
…
Okay… But Why? 😟
🐥 But Why? 🤨 |
|---|
InstaTweet has two main use cases:
Regardless of your intention, InstaTweet will detect new posts from the users you specify, download them, and repost them to Twitter. |
…
Other Use Case: The InstaClient
The package’s custom InstaClient can also be used as a standalone Instagram scraper
from InstaTweet import InstaClient
>>> ig = InstaClient(session_id="kjfdn309wredsfl")
# Scrape Instagram user or hashtag
>>> user = ig.get_user('dailykittenig')
>>> hashtag = ig.get_hashtag('#dailykitten')
>>> print(user, hashtag, sep='\n')
Instagram User: @dailykittenig
Instagram Hashtag: #dailykitten
# Download most recent post
>>> post = user.posts[0]
>>> print(post)
>>> ig.download_post(post)
Post 2981866202934977614 by @dailykittenig on 2022-11-29 01:44:37
Downloaded post https://www.instagram.com/p/Clht4NRrqRO by dailykittenig to C:\path\to\insta-tweet\downloads\2981866202934977614.mp4
…
Installation
To install using pip:
pip install insta-tweet
Please note that InstaTweet requires Python >= 3.8
…
Documentation
The rest of this README, the API documentation, and snippets can all be found on Read the Docs
Metadata
Release files for insta-tweet 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| insta-tweet-2.2.1.tar.gz | 20.0 kB | Without provenance | Details for insta-tweet-2.2.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| insta_tweet-2.2.1-py3.10.egg | Legacy Egg format | - | - | Details for insta_tweet-2.2.1-py3.10.egg |
| insta_tweet-2.2.1-py3-none-any.whl | Python 3 | none | any | Details for insta_tweet-2.2.1-py3-none-any.whl |
Total release size: 94.5 kB
Release files / insta-tweet-2.2.1.tar.gz
| Download URL | insta-tweet-2.2.1.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c389869743d3f79902c5d70505f9edb1ab639050cc4cdbe0bbd4a48bc41e56f
|
|
BLAKE2b-256 checksum How to use checksums |
95e60a4cbc7c1acebbf6a79a1143c7eab0de9d041b848979ead747891ce25bd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.1
|
Release files / insta_tweet-2.2.1-py3.10.egg
| Download URL | insta_tweet-2.2.1-py3.10.egg |
|---|---|
| Size | 50.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
2f761a5f234a6b22ea0410ec141196f64e16e9a5f1bbc26b46449ca7989e999e
|
|
BLAKE2b-256 checksum How to use checksums |
f7550e85b62a338742aa878f2a99d0b4bfa76f3903b62141a2ecf800a4d3c742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.1
|
Release files / insta_tweet-2.2.1-py3-none-any.whl
| Download URL | insta_tweet-2.2.1-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
611d2a16e93cb0bd38aba05dd2eb0d194cf1d122d996901e156fb0d12ed03f5a
|
|
BLAKE2b-256 checksum How to use checksums |
ae4c1baed6339b5000670dacc401470c69b1db6c11c3520623a24c5634e640a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.1
|
Security for insta-tweet 2.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.