How curiolytics/pdfs_downloader works
Main Components
• Entry Point: The main.py file serves as the entry point where execution is initiated.
• Web Driver Component: Represented by the function init_webdriver, this component sets up and manages the ChromeDriver instance.
• Authentication Module: The login_to_lms function handles the single authentication process. Emphasize that the system restricts the session to a single login.
• PDF Extraction Module: The get_pdf_links function is responsible for scanning the authenticated page for PDF links.
• Download Module: The download_pdfs function takes the filtered links and downloads PDF files to the "downloaded_files" directory.
• External Service: The LMS website (login URL and course URL) – show this as an external system that the scraper interacts with.
Out the Relationships and Flow
• Finally, the download_pdfs component writes output (PDF files) to the "downloaded_files" directory.
Architectural Patterns and Design Principles
• Modular Design: Each function (init_webdriver, login_to_lms, get_pdf_links, download_pdfs) is a self-contained module, which promotes separation of concerns.
• Pipeline Flow: Emphasize the sequential flow from initialization to PDF download, illustrating a pipeline-like execution.
• Input/Output Handling: Clearly list the required input parameters (ChromeDriver Path, URLs, credentials, etc.) and the final output (downloaded PDF files).