AbstractAbstract ReadonlyidUnique identifier for this provider
Abstract ReadonlynameDisplay name for this provider
Abstract ReadonlylogoURL to the provider's logo image
PrivateactiveCurrently active image fetch count
PrivatependingQueue of pending image fetch requests
AbstractgetGets the base URL for this provider based on user locale
Promise resolving to the provider's base URL
AbstractdiscoverDiscovers all recipe category URLs from the provider
The provider's base URL
Optionalsignal: AbortSignalOptional abort signal for cancellation
Promise resolving to array of category page URLs
AbstractextractExtracts recipe links from an HTML page
Raw HTML content of a page
Array of discovered recipe links with optional title and image
Discovers recipe URLs from the provider with streaming progress
Scans category pages in batches and yields progress updates as recipes are found. Automatically retries pages that appear rate-limited.
Discovery options including abort signal and max recipes
Parses selected recipes to extract full recipe data
Fetches and parses each selected recipe, downloading images to cache and converting to the app's internal format. Yields progress updates for UI feedback during the parsing process.
Recipes selected by the user for import
Parsing options including abort signal and default persons
Fetches and parses a single recipe from its URL
URL of the recipe page to fetch
Default serving size if not specified in recipe
Patterns for ingredients to skip during parsing
Optionalsignal: AbortSignalOptional abort signal for cancellation
Promise resolving to the fetched and converted recipe
Returns the URL of the known placeholder image for this provider, if any
Used by ImageRepair to detect recipes stored with placeholder content by comparing MD5 hashes of local files against the placeholder.
The placeholder image URL, or null if this provider has no known placeholder
Returns true if this provider can handle the given recipe source URL
Default implementation returns false. Subclasses should override to check whether the URL belongs to their domain.
Recipe source URL to test
false by default
Fetches just the image URL for a recipe page on-demand
Used for visibility-based lazy loading of images. Fetches the recipe page HTML and extracts the image URL from JSON-LD schema data.
Recipe page URL to fetch image for
Abort signal for cancellation
Promise resolving to image URL or null if not found/failed
ProtectedfetchProtectedextractExtracts preview metadata from HTML for display before full parsing
Raw HTML content
Recipe page URL for host detection
Promise resolving to preview metadata with title and image URL
ProtecteddelayDelays execution for rate limiting
Milliseconds to delay
Promise that resolves after the delay
PrivatecreateCreates initial discovery state
PrivatecreateCreates a progress update object from current state
PrivatescanScans category pages in batches and yields progress updates
PrivatefetchFetches a batch of category pages concurrently
PrivateprocessProcesses results from a batch of category page fetches
PrivateprocessProcesses a successfully fetched category page
PrivateprocessProcesses a failed category page fetch
PrivateaddAdds discovered recipe links to state, avoiding duplicates
PrivateretryRetries empty pages that appeared before the last successful page (likely rate-limited)
PrivateexecuteExecutes a single retry attempt for failed pages
PrivatefetchQueues a recipe image fetch for background processing
Adds the request to a queue and triggers processing. Uses a semaphore pattern to limit concurrent requests and prevent memory exhaustion.
Recipe URL to fetch image for
Callback invoked when an image URL is found
Optionalsignal: AbortSignalOptional abort signal for cancellation
PrivateprocessProcesses queued image fetch requests with concurrency limiting
Dequeues requests and executes them up to MAX_CONCURRENT_IMAGE_FETCHES at a time. Each completed request triggers queue processing to maintain throughput while preventing memory exhaustion.
PrivatecombineCombines two abort signals into one
Creates a new abort signal that triggers when either input signal aborts.
First abort signal
Second abort signal
Combined abort signal
Abstract base class for recipe providers
Implements the RecipeProvider interface with common functionality for discovering, parsing, and fetching recipes from external websites. Subclasses must implement provider-specific methods for URL extraction.