How b31ngd3v/instagram-post-scheduler works
Main Components
• Configuration / Setup: This section includes the hard-coded parameters in scheduler.py (username, password, file_path, scheduled time, and caption). It represents the starting point where the user customizes the script.
• Scheduler Component: This segment uses the “schedule” Python library. It’s responsible for triggering the post action at a specific time.
• Web Automation Engine: This is handled by Selenium. Create a component labeled “Selenium Bot” or “Automation Engine” that encapsulates the Selenium interactions with Instagram.
• Web Browser & Chromedriver: This represents the external Chrome Browser that is driven by Safari/chromedriver, since the script requires Chrome installed and correctly configured chromedriver.
• Instagram’s Web Interface: This external system is where the post action is executed. It interacts with the Selenium Bot to simulate clicking buttons, uploading images/videos, and (optionally) expanding the image if needed.
• User Media/File System: The scheduler picks up an image or video from a specified file path on the local machine. Include a component that shows the interaction between the script and the local file system for media upload.
• Then, connect the “Chrome Browser” to the “Instagram Web Interface” illustrating the interactions such as logging in and posting.
• That within the Selenium-driven process there can be a conditional step for "expanding" content (as noted in the README).
Architectural Patterns and Design Principles
• A clear separation between the timing logic and the web automation, ensuring it’s clear that external elements (such as Chrome Browser and Instagram Web UI) are distinct from the core Python logic.
• Dependency on external libraries and components (Selenium, schedule, pyautogui) which are critical for the system’s operation.
Relevant Technologies
• Python as the programming language.
• Selenium for browser automation.
• Schedule for timing the post.
• PyAutoGUI for any additional GUI automation.
• Chrome (the browser) and Chromedriver for controlling browser actions.
• Local File System integration for reading the media file that is to be uploaded.