Instagram Profile Archiver is a Python-based tool that allows users to download and create an archive of Instagram posts from any public profile. The tool generates a professional PDF report that includes images, captions, likes, and other metadata for each post. The PDF is formatted to be visually appealing, clean, and suitable for presentations or professional portfolios.
- Download Instagram posts and related images from any public profile.
- Supports input as Instagram usernames or direct links.
- Generate a high-quality PDF archive including post images, captions, likes, and dates.
- Handles profiles with multiple images per post by creating high-resolution collages.
- Provides professional cover page and PDF metadata.
- Includes error handling for invalid usernames and connection issues.
This guide will help you get a copy of the Instagram Profile Archiver up and running on your local machine for development and testing purposes.
Ensure you have the following installed on your system:
- Python 3.6+
- pip
- An Instagram account (for scraping public profile information using Instaloader)
You will also need the following Python packages:
instaloaderfpdf2Pillow
To install these dependencies, follow the Installation section.
-
Clone the repository to your local machine:
git clone https://github.com/your-username/instagram-profile-archiver.git cd instagram-profile-archiver -
Install the required dependencies:
pip install -r requirements.txt
Alternatively, you can install the dependencies manually:
pip install instaloader fpdf2 Pillow
-
Make sure you have Python 3.6 or higher installed by running:
python --version
The Instagram Profile Archiver can be used to download any public profile's posts and generate a PDF archive. Follow these steps to get started:
-
Run the script:
python src/main.py
-
Enter the Instagram username or profile URL when prompted:
Enter the Instagram username or URL: https://www.instagram.com/username/ -
The tool will start downloading posts and generate the PDF report.
The PDF output contains:
- Cover Page: Includes the profile picture, username, and description of the document.
- Post Pages: Each page has:
- Images from the post (single image or collage).
- Post date, caption, and likes.
- Page Numbering: Each page includes a footer with the page number for easy navigation.
The script includes error handling to manage common issues:
- Invalid Username: Prompts the user to enter a valid username if the provided one doesn't exist.
- Connection Issues: Displays a message if there's a problem connecting to Instagram, such as network issues.
- Unexpected Errors: Catches any unexpected exceptions and provides an error message to guide the user.
The project has the following structure:
InstArchive Pro/
├── src/
│ ├── main.py # Main script to run the archiver
├── LICENCE
├── requirements.txt # Dependencies for the project
└── README.md # Project documentation
- Instaloader Integration: The tool uses
instaloaderto download posts and profile pictures from Instagram. - FPDF2 for PDF Generation: The
fpdf2library is used to create a professional-looking PDF, with headers, footers, and a cover page. - Pillow for Image Processing: The
Pillowlibrary is used to create collages from posts with multiple images.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, feel free to contact me:
- GitHub: MuhammadMoiz20(https://github.com/MuhammadMoiz20)
- Email: moizzahidofficial@gmail.com
Thank you for using InstArchive pro!