Integrate instagram to discord
Project description
Instagram to Discord 💙
Description 📝
This is a simple abstraction layer for the Instagram API, which allows you to get the latest posts from a user and send them to a Discord channel.
How it works? ⁉
Installation 📦
pip install instagram-to-discord
Or you can install it from the source code:
git clone https://github.com/jd-apprentice/instagram-to-discord.git
cd instagram-to-discord
pip install requirements.txt
Usage 📸
Get data from instagram
For that we have a script called fetch_posts.sh
localed in utils/
folder. You can use it like this:
sh utils/fetch_posts.sh <username>
This will create a folder with the name of the user and inside it will be the photos and videos that the user has uploaded.
import os
from instagram-to-discord import DiscordInstagramPoster
current_folder = os.getcwd()
ask_directory = input("Enter the directory where the photos are stored (Your Instagram username): ")
folder_path = os.path.abspath(os.path.join(current_folder, ask_directory))
webhook_url = "YOUR_WEBHOOK_URL"
footer_text = "This is my title"
footer_url = "https://cdn.mos.cms.futurecdn.net/SeV6kiGf8ZsKGKNBrALzJN.jpg"
title = "!Sample Title!"
discord_instagram_poster = DiscordInstagramPoster({
"webhook_url": webhook_url,
"footer_text": footer_text,
"footer_icon": footer_url,
"title": title
})
discord_instagram_poster.get_latest_photo(folder_path)
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
instagram-to-discord-0.1.1.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for instagram-to-discord-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a34015051f6f3a661d8c037ba8c454063e3ca3fc24e24fcc85bfd3c250f952f |
|
MD5 | 196208131aab655c6c62d51d36753b1a |
|
BLAKE2b-256 | 53abe3ef9c60841e09c673b3962b272a7faee689843ad4ea48146d4e088fe9df |
Close
Hashes for instagram_to_discord-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24dbdf7ba5e951f16889bf88f9eecc789828c61a2d1f8213494773ce943a13b9 |
|
MD5 | 234b0fafb6877d7b15b9ad9cd4696ba5 |
|
BLAKE2b-256 | 77a5c1fc57b7f0ca49fec200b86981e8977157d9ea45be7e61239c85355a5c99 |