How rekyungmin/biblebot-scraper works
Main Components
a. Core Components:
• HTTP Client Layer
• Both aiohttp and requests implementations
• Abstract BaseRequest class
• API Layer
• Five main API modules (Intranet, LMS, KBU, Mileage, Library)
• Parser Layer
• Parsing functionality for each API
b. External Systems:
• Five target websites to scrape:
• KBU Intranet (kbuis.bible.ac.kr)
• KBU LMS (lms.bible.ac.kr)
• KBU Homepage (bible.ac.kr)
• OKPOS Mileage System
• KBU Library
[External Websites] <--HTTP--> [HTTP Client Layer] <--> [API Layer] <--> [Parser Layer] --> [Structured Data Output]
Specific Elements
a. HTTP Client Layer:
• Abstraction with BaseRequest
• Both async (aiohttp_conn) and sync (requests_conn) implementations
• Extensibility for other HTTP clients
b. API Layer:
• Five main API modules
• Common utilities and base classes
• Shared functionality through common.py
c. Parser Layer:
• How each API module has its own parsing logic
• Use of BeautifulSoup4 for HTML parsing
Important Details to Highlight
• The modular nature of the HTTP client implementation
• The separation of concerns between fetching and parsing
• The common base classes and utilities
• The async/sync support
• The extensibility points