[PR #26] [MERGED] Progress bar during downloading of followers or followings #57

Closed
opened 2026-02-27 20:05:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/misiektoja/instagram_monitor/pull/26
Author: @tomballgithub
Created: 1/1/2026
Status: Merged
Merged: 1/2/2026
Merged by: @misiektoja

Base: devHead: progress_bar


📝 Commits (4)

  • fc8ad39 Progress bar during downloading of followers or followings
  • f38fd59 Remove messages that are redundant with the progress bar.
  • c90ee9e refactor: enhance formatting and add tqdm
  • e9ebdc0 refactor: streamline progress bar management and enhance logging functionality

📊 Changes

2 files changed (+200 additions, -4 deletions)

View changed files

📝 instagram_monitor.py (+199 -4)
📝 requirements.txt (+1 -0)

📄 Description

Progress bar during downloading of followers or followings, to provide additional information, since this can take awhile. If someone is having challenges keeping their instagram login from not getting flagged, this is helpful because it shows what is going on.

extract_usernames_safely is more elaborate than needed. It could just return a # of names, but I am also using this routine to log write the names to a log, so I didn't remove passing back the names.

Example while in progress:

Timestamp:              Thu 01 Jan 2026, 11:45:03
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Followers (188) loaded from file 'instagram_xxx.json' (01 Jan 26, 11:08)

* Followings (4269) loaded from file 'instagram_xxx.json' (31 Dec 25, 20:17)
* Followings number changed by user xxx from 4269 to 4281 (+12)
* Downloading Followings:  31%|██████████████▎                               | 1336/4281 [11 names/req, reqs=116, mins=11.2, remain=25.1]

Example after initial loading of script:

* Followers (187) loaded from file 'instagram_XXX_followers.json' (31 Dec 25, 09:36)
* Followers number changed for user XXX from 187 to 188 (+1)
* Downloading Followers: 100%|█████████████████████████████████████████████████████| 188/188 [9 names/req, reqs=19, mins=1.7, remain=0.0]
* Followers saved to file 'instagram_XXX_followers.json'

* Followings (4266) loaded from file 'instagram_XXX_followings.json' (31 Dec 25, 09:36)
* Followings number changed by user XXX from 4266 to 4267 (+1)
* Downloading Following: 100%|███████████████████████████████████████████████▉| 4266/4267 [11 names/req, reqs=378, mins=34.4, remain=0.0]
* Followings saved to file 'instagram_XXX_followings.json'

The only oddity is if an instaloader error occurs, which can cause the following. It's not a big deal, but I'd prefer to be able to filter those out.

* Downloading Followings:  16%|████████                                         | 699/4281 [11 names/req, reqs=60, mins=5.8, remain=31.0]JSON Query to graphql/query: HTTPSConnectionPool(host='www.instagram.com', port=443): Max retries exceeded with url: /graphql/query?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%2227129100349%22%2C%22first%22%3A12%2C%22after%22%3A%22QVFEV05KNHNpT25XSEpfcnQ2Sk9hQ3huM28tWGcyUXU1OFh1c0RMRjFnVVcwajNZTGY3Z3NRRHBKampPdl9vaTlhN1YzQ3l4YjhPZlN1RXFLM3VuLTd6TQ%3D%3D%22%7D (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001BD178B2B60>: Failed to resolve 'www.instagram.com' ([Errno 11001] getaddrinfo failed)")) [retrying; skip with ^C]
* Downloading Followings:  28%|█████████████                                  | 1187/4281 [11 names/req, reqs=103, mins=9.7, remain=23.7]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/misiektoja/instagram_monitor/pull/26 **Author:** [@tomballgithub](https://github.com/tomballgithub) **Created:** 1/1/2026 **Status:** ✅ Merged **Merged:** 1/2/2026 **Merged by:** [@misiektoja](https://github.com/misiektoja) **Base:** `dev` ← **Head:** `progress_bar` --- ### 📝 Commits (4) - [`fc8ad39`](https://github.com/misiektoja/instagram_monitor/commit/fc8ad392b11da794f3aa7809143a76452bd4011e) Progress bar during downloading of followers or followings - [`f38fd59`](https://github.com/misiektoja/instagram_monitor/commit/f38fd596a87840c282c75999cb415e28599569a6) Remove messages that are redundant with the progress bar. - [`c90ee9e`](https://github.com/misiektoja/instagram_monitor/commit/c90ee9e30ca9b2f0e41c49e4729c173e2592d116) refactor: enhance formatting and add tqdm - [`e9ebdc0`](https://github.com/misiektoja/instagram_monitor/commit/e9ebdc0cca0fc5725e4f488537dc6422d33d5ea9) refactor: streamline progress bar management and enhance logging functionality ### 📊 Changes **2 files changed** (+200 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `instagram_monitor.py` (+199 -4) 📝 `requirements.txt` (+1 -0) </details> ### 📄 Description Progress bar during downloading of followers or followings, to provide additional information, since this can take awhile. If someone is having challenges keeping their instagram login from not getting flagged, this is helpful because it shows what is going on. _extract_usernames_safely_ is more elaborate than needed. It could just return a # of names, but I am also using this routine to log write the names to a log, so I didn't remove passing back the names. Example while in progress: ``` Timestamp: Thu 01 Jan 2026, 11:45:03 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Followers (188) loaded from file 'instagram_xxx.json' (01 Jan 26, 11:08) * Followings (4269) loaded from file 'instagram_xxx.json' (31 Dec 25, 20:17) * Followings number changed by user xxx from 4269 to 4281 (+12) * Downloading Followings: 31%|██████████████▎ | 1336/4281 [11 names/req, reqs=116, mins=11.2, remain=25.1] ``` Example after initial loading of script: ``` * Followers (187) loaded from file 'instagram_XXX_followers.json' (31 Dec 25, 09:36) * Followers number changed for user XXX from 187 to 188 (+1) * Downloading Followers: 100%|█████████████████████████████████████████████████████| 188/188 [9 names/req, reqs=19, mins=1.7, remain=0.0] * Followers saved to file 'instagram_XXX_followers.json' * Followings (4266) loaded from file 'instagram_XXX_followings.json' (31 Dec 25, 09:36) * Followings number changed by user XXX from 4266 to 4267 (+1) * Downloading Following: 100%|███████████████████████████████████████████████▉| 4266/4267 [11 names/req, reqs=378, mins=34.4, remain=0.0] * Followings saved to file 'instagram_XXX_followings.json' ``` The only oddity is if an instaloader error occurs, which can cause the following. It's not a big deal, but I'd prefer to be able to filter those out. ``` * Downloading Followings: 16%|████████ | 699/4281 [11 names/req, reqs=60, mins=5.8, remain=31.0]JSON Query to graphql/query: HTTPSConnectionPool(host='www.instagram.com', port=443): Max retries exceeded with url: /graphql/query?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%2227129100349%22%2C%22first%22%3A12%2C%22after%22%3A%22QVFEV05KNHNpT25XSEpfcnQ2Sk9hQ3huM28tWGcyUXU1OFh1c0RMRjFnVVcwajNZTGY3Z3NRRHBKampPdl9vaTlhN1YzQ3l4YjhPZlN1RXFLM3VuLTd6TQ%3D%3D%22%7D (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001BD178B2B60>: Failed to resolve 'www.instagram.com' ([Errno 11001] getaddrinfo failed)")) [retrying; skip with ^C] * Downloading Followings: 28%|█████████████ | 1187/4281 [11 names/req, reqs=103, mins=9.7, remain=23.7] ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:05:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/instagram_monitor#57
No description provided.