How okr3vl/osgifi works
Project type and purpose
• This is an open-source Python CLI tool (“OSGIFI”) for discovering and gathering public and some hidden information from Instagram accounts.
• The tool is installed as a Python package and invoked via a command-line entrypoint (OSGIFI -u username -s sessionid).
File structure
• Top-level files:
• LICENSE, README.md – documentation
• SetUp.py – installer script (defines entry point)
• Package directory: OSGIFI/
• __init__.py – package marker
• main.py – CLI entrypoint and orchestration logic
README for additional insights
• Describes the data points gathered (full name, follower count, private status, hidden email, etc.)
• Usage pattern: Pass Instagram session cookie + username to the CLI
Main components & relationships
a. Components
1. CLI Entrypoint (main.py)
2. Core Module (scraper logic, in OSGIFI/)
3. HTTP Client (requests or similar library)
4. Data Parser (HTML/JSON parsing sub‐component)
5. Output Formatter (console print, JSON, or file)
6. External Service: Instagram Web Endpoints
b. Relationships & Data Flow
1. User types command → CLI Entrypoint
2. CLI Entrypoint calls Core Module with parameters (username, sessionid)
3. Core Module uses HTTP Client to send request (with session cookie) to Instagram
4. Instagram responds with HTML/JSON → HTTP Client returns raw data
5. Core Module passes raw data to Data Parser → extracts required fields
6. Parsed data goes to Output Formatter → displays structured results to user
c. Architectural patterns & principles
• Layered/Modular design: clear separation between CLI, networking, parsing, and presentation
• Single Responsibility: each module does one thing (e.g., scraping vs. parsing)
• Extensibility point: new data‐extractor functions can be dropped into the parser
d. Key technologies/frameworks
• Python 3.x
• requests (or built-in urllib) for HTTP calls
• argparse for CLI parsing
• BeautifulSoup or json library for parsing (if used)