This content originally appeared on DEV Community and was authored by ibnaleem
python3 main.py -h
usage: Instagram Tracker [-h] -u USERNAME
📸 an Instagram tracker that logs any changes to an Instagram account
(followers, following, posts, and bio)
options:
-h, --help show this help message and exit
-u USERNAME, --username USERNAME
The username of the account to track
🤝 Contribute: https://github.com/ibnaleem/instatracker
You must login to your Instagram account in order to properly scrape someone else's Instagram account. This is due to Instagram blocking
HTTPS GET
requests from unauthenticated cookies. Your login information is never stored. See more here and here.You can always create/use an alt-account for the login.
Installation
Clone this repository:
$ git clone https://github.com/ibnaleem/instatracker.git
Install dependencies:
$ pip install -r requirements.txt
Set user
& passwd
field on line 56
self.bot.login(user="YOUR INSTAGRAM USERNAME", passwd="YOUR INSTAGRAM PASSWORD") # this allows us to access & scrape Instagram.
Run the script
$ python3 main.py -u USERNAME
Automated Logging
InstaTracker not only displays all modifications an Instagram account makes directly to the terminal (e.g., USERNAME has unfollowed 1 person), but it also records these changes in a text file, including the date and time.
------2024-06-30 01:01:13.659694+00:00------
johndoe has 100
johndoe is following 100 people
johndoe has 0 posts
johndoe has the following bio: this is my biography
------2024-06-31 02:03:15.761715+00:00------
johndoe has lost 2 followers (100 followers --> 98 followers)
------2024-06-31 05:03:15.761715+00:00------
johndoe has gained 5 followers (98 followers --> 103 followers)
...
This script checks for any changes every 5 minutes because Instagram's firewall starts blocking requests that are sent too quickly. You can manually update this here, but do not be surprised if the script stops working.
Built With
LICENSE
This repository is under the MIT License
Created By
This content originally appeared on DEV Community and was authored by ibnaleem
ibnaleem | Sciencx (2024-07-05T01:56:17+00:00) A Simple Instagram Tracking Script Written in Python. Retrieved from https://www.scien.cx/2024/07/05/a-simple-instagram-tracking-script-written-in-python/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.