Skip to content

Add resolve_ids.py to fill Instagram user IDs in accounts.json - #5

Merged
kevinjylin merged 1 commit into
mainfrom
feat/resolve-instagram-ids
Sep 2, 2026
Merged

Add resolve_ids.py to fill Instagram user IDs in accounts.json#5
kevinjylin merged 1 commit into
mainfrom
feat/resolve-instagram-ids

Conversation

@kevinjylin

Copy link
Copy Markdown
Member

Summary

  • Adds pipeline/resolve_ids.py to bulk-fill instagram_user_id in accounts.json from Instagram handles
  • Uses Instagram web_profile_info (CommentPicker-style), not instaloader scrape-time lookup
  • Adds mocked unit tests in pipeline/tests/test_resolve_ids.py

Problem

UCR org handles land in accounts.json via discover.py, but numeric IDs were being pasted by hand from commentpicker.com. Relying on instaloader during scrape to resolve IDs was flaky.

Usage

cd pipeline
python resolve_ids.py              # fill missing IDs
python resolve_ids.py --dry-run
python resolve_ids.py --only acm_ucr,cyber_ucr
python resolve_ids.py --force      # re-resolve existing IDs
python resolve_ids.py --strict     # fail if any targeted handle errors

Default: only missing IDs, 2–5s jitter, retries on 401/429, writes partial progress. Run from a normal home/campus network — some datacenter IPs get hard rate-limited.

Test plan

  • cd pipeline && python -m unittest tests.test_resolve_ids
  • python resolve_ids.py --dry-run --only acm_ucr from a local network
  • Confirm instagram_user_id written for a handle that was missing one

Automate CommentPicker-style username to ID lookup as an offline pipeline step after discover.py, so scrape.py can keep using cached instagram_user_id values without manual copy/paste.
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
highlander-hub Ready Ready Preview Sep 2, 2026 5:36am UTC

@kevinjylin
kevinjylin merged commit af5ecf2 into main Sep 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant