The Social Media Toolkit is an easy-to-use application that helps you download media content from social media platforms like Instagram, YouTube, Twitter, and Pinterest. It uses Python libraries like requests
, BeautifulSoup
, instaloader
, and pytube
, and has a simple GUI built with customtkinter
.
- Download Videos from YouTube and Instagram
- Download Images from Pinterest
- Download Media from Twitter
- User-Friendly Interface with CustomTkinter
- Clone the repository:
git clone https://github.com/MSC72m/social-media-toolkit.git cd social-media-toolkit
Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install Required Libraries:
pip install requests beautifulsoup4 customtkinter pytube instaloader threading random
Run the application:
python main.py
Enter a URL in the input field of the GUI and click the "Analyze URL and Download" button.
Instagram has 12 anonymous download limit, if you encounter 401 errors it's because of that.
Meta is sensitive to scraping methods, In inorder to limit the risk of getting your main account banned, preferably create a fake Instagram account and use that to download media. if you don't download near the 1000 download limit daily, the risk of getting banned is lower but still, it's recommended to use a fake account for this perpose
-
navigate to the project directory.
-
Open the script file.
-
Replace the entire
download_instagram_video
function in your script with the following code:def download_instagram_video(link, username='your_username', password='your_password'): loader = instaloader.Instaloader() """ replacing the function with this and replacing the username and password you won't have 401 error and 12 item rate limit will be lifted to 1000 """ # Login to Instagram try: loader.login(username, password) except instaloader.exceptions.BadCredentialsException: messagebox.showerror("Error", "Invalid username or password.") on_operation_done() return except instaloader.exceptions.ConnectionException: messagebox.showerror("Error", "Connection error, please check your internet connection.") on_operation_done() # Callback to re-enable the button return except Exception as e: messagebox.showerror("Error", f"An unexpected error occurred: {e}") on_operation_done() return try: post = instaloader.Post.from_shortcode(loader.context, link.split('/')[-2]) video_url = post.video_url download_video(video_url, f"downloaded_instagram_video{save_path}.mp4") messagebox.showinfo("Success", "Video downloaded successfully.") on_operation_done() except Exception as e: messagebox.showerror("Error", f"Error downloading Instagram video: {e}") on_operation_done()
-
Replace
'your_username'
and'your_password'
with your Instagram login credentials in thedownload_instagram_video
function. -
Run the script:
python main.py
By following these instructions, users will be able to download more than the anonymous limit of 12 files by logging in with their Instagram credentials (it will have a 1000-item limit).
- Python 3.x
- Required libraries:
requests
beautifulsoup4
re
customtkinter
tkinter
pytube
instaloader
threading
random
If you encounter network-related errors, ensure you have a stable internet connection and try again.
If you see an "Unsupported URL" warning, make sure the URL is from one of the supported domains (Instagram, YouTube, Pinterest, Twitter).
Error messages will be displayed in a message box if any issues occur during the download process. Review these messages to understand what went wrong.
Contributions are welcome! Please create an issue or submit a pull request for any improvements or new features.