# ============================================================ # File: scraper/book_scraper.py # Purpose: # Backwards-compatible wrapper giving same API as before. # Uses the new engine under the hood. # ============================================================ from scraper.engine.parser import extract_metadata_full class BookScraper: def __init__(self, site_scraper, url): self.site = site_scraper self.url = url def execute(self): """ Backwards compatible full scrape: returns {title, author, description, cover_url, chapters, book_url} """ return extract_metadata_full(self.url, self.site)