Skip to content

ryyos/InstaHarvest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InstaHarvest

Version ProjectImage

This program is a program that can be used to retrieve data from Instagram and download their content

Feature ✨

  • Using requests instead of webdriver makes it lighter and faster
  • use of cookies and check expiration so you don't need to always log in
  • can download all content uploaded by users
  • search for the target user ID automatically so that the user only needs to enter the target username
  • providing an update_component file to make it easier for those who have difficulty using the flag command
  • The download quality does not decrease and the quality will remain the same as the original quality of the post

Tech 💻

  • python-dotenv is a convenient Python library that simplifies the management of environment variables in your projects. It allows you to load variables from a .env file into your environment, making it easy to configure and control settings for your applications.
  • icecream is a Python library that provides a simple and informative way to log code, helping with monitoring program execution flows.
  • requests is an easy-to-use Python library for interacting with APIs and making HTTP requests.
  • tqdm is a Python library that provides an aesthetic progress bar to monitor the execution process in iterations.

Requirement ⚙️

Installation 🛠️

To run this program you need to install some libraries with the command

pip install -r requirements.txt

How To Run ?🤔

# Clone this repositories
git clone https://github.com/ryosoraa/InstaHarvest.git

# go into the directory
cd InstaHarvest

To run the program the first time you have to include several flags

python main.py --username target_username --cookies '<YOUR_COOKIES>' --igclaim '<YOUR-X-Ig-Www-Claim>' --path '<YOUR_PATH_TO_SAVE>'

or if you don't understand you can run the update_component.py file and insert COOKIES and X-Ig-Www-Claim there

python update_component.py

How To Get COOKIES And X-Ig-Www-Claim ?🍪

⚠️I suggest not using your main account because we do not guarantee that your account will not be blocked⚠️

  1. Log in to the Instagram account you want to use to retrieve data

  2. If you are already logged in then continue by opening the target account profile

  3. Open developer Tool Using Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux)

  4. Open the network menu and run the shortcut CTRL + R to reload the page



  5. look for the name that has: username/?count=12



  6. Click and scroll down until you find Cookies and X-Ig-Www-Claim



  7. Copy Cookies and X-Ig-Www-Claim to insert into the code above

Flags 🚩

Flag Alias Descriptions Example
--username -u Insert username account target --username freya.jkt48
--cookies -c Insert your cookies --cookies 'sxdfcgvbhnj'
--igclaim -ic Insert your X-Ig-Www-Claim --igclaim 'dcfvgbhjnmk'
--path -p Insert your PATH you want to save --path 'data/content'

🚀Structure

│   .env
│   .gitignore
│   LICENSE
│   main.py
│   README.md
│   requirements.txt
│   update_component.py
│
├───data
└───src
    │   __init__.py
    │
    ├───exceptions
    │       ExpiredExceptions.py
    │       PathNotFoundExceptions.py
    │
    ├───service
    │       instagram.py
    │
    └───utils
            Arguments.py
            file.py

Author 🧑‍💻

👤 Rio Dwi Saputra

Ryo's LinkedIn B Ryo's Instagram

Releases

No releases published

Packages

No packages published

Languages