You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
641 B
21 lines
641 B
# ============================================================
|
|
# File: scraper/services/site_resolver.py
|
|
# Purpose:
|
|
# Determine which BookSite implementation applies for a given URL.
|
|
# This keeps INIT-flow and SCRAPE-flow site-agnostic.
|
|
# ============================================================
|
|
|
|
from scraper.sites import BookSite # current PTWXZ implementation
|
|
|
|
|
|
class SiteResolver:
|
|
"""
|
|
Resolves the correct BookSite class based on URL.
|
|
Currently only PTWXZ/Piaotian is supported.
|
|
"""
|
|
|
|
@staticmethod
|
|
def resolve(url: str):
|
|
# Later: add more domain rules for other sources
|
|
return BookSite()
|