Extract base URL from the board list page URL.
(url: str)
| 2390 | |
| 2391 | @staticmethod |
| 2392 | def _detect_base_url(url: str) -> str: |
| 2393 | """Extract base URL from the board list page URL.""" |
| 2394 | m = re.match(r"(https://www\.mfds\.go\.kr/eng/brd/m_\d+/)", url) |
| 2395 | return m.group(1) if m else "https://www.mfds.go.kr/eng/brd/m_61/" |
| 2396 | |
| 2397 | @staticmethod |
| 2398 | def _parse_news(html: str, base_url: str) -> list[dict]: |