Preparing search index...

    Quitoque recipe provider implementation

    Extends BaseRecipeProvider with Quitoque-specific URL patterns and pagination-based discovery. Treats each page as a "category" for compatibility with the base class discovery flow.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    id: "quitoque" = 'quitoque'

    Unique identifier for this provider

    name: "Quitoque" = 'Quitoque'

    Display name for this provider

    logoUrl: "https://www.quitoque.fr/media/cache/logo_10_years/build/quitoque/theme/images/logo-10-years.47dd494d.png" = QUITOQUE_LOGO_URL

    URL to the provider's logo image

    supportedLanguages: readonly ["fr"] = ...

    Methods

    • Fetches HTML content from a URL with timeout handling

      Parameters

      • url: string

        URL to fetch

      • Optionalsignal: AbortSignal

        Optional abort signal for cancellation

      Returns Promise<string>

      Promise resolving to the HTML content

      Error if request fails or times out

    • Returns the URL of Quitoque's known placeholder image

      The recipe-scrapers library returns this placeholder for all Quitoque recipes. ImageRepair uses it to detect recipes stored with placeholder content via MD5 comparison.

      Returns string

      The Quitoque placeholder image URL

    • Discovers recipe page URLs using pagination metadata from HTML

      Quitoque uses pagination instead of categories. This method extracts the max page number from pagination links in the HTML and returns URLs for all pages.

      Parameters

      • baseUrl: string

        The Quitoque base URL

      • Optionalsignal: AbortSignal

        Optional abort signal for cancellation

      Returns Promise<string[]>

      Promise resolving to array of paginated page URLs

    • Extracts the maximum page number from pagination links in HTML

      Parses the HTML to find all ?page=X links and returns the highest number. This is more reliable than probing as it uses the site's own pagination.

      Parameters

      • html: string

        Raw HTML content containing pagination links

      Returns null | number

      The maximum page number found, or null if no pagination found

    • Extracts recipe links from HTML content

      Parses HTML to find recipe URLs matching the Quitoque pattern (/recettes/[slug]). Extracts titles from URL slugs.

      Parameters

      • html: string

        Raw HTML content to parse

      Returns { url: string; title?: string; imageUrl?: string }[]

      Array of recipe links with URLs and extracted titles

    • Fetches the image URL for a Quitoque recipe page

      The Python recipe-scrapers library returns placeholder images for Quitoque. This override extracts the real image directly from JSON-LD schema.

      Parameters

      • url: string

        Recipe page URL

      • signal: AbortSignal

        Abort signal for cancellation

      Returns Promise<null | string>

      Promise resolving to image URL or null

    • Extracts a human-readable title from a recipe URL slug

      Converts URL slugs like "/recettes/poulet-roti-aux-herbes" to readable titles like "Poulet roti aux herbes".

      Parameters

      • path: string

        Recipe URL path

      Returns string

      Formatted title with first letter capitalized