Scrapes a recipe from a URL.
The recipe page URL to scrape.
Optionaloptions: ScrapeOptionsOptional scraping options.
A result object with either the scraped recipe data or an error.
Scrapes a recipe from HTML content.
Useful when you've already fetched the HTML yourself and want to avoid an additional network request.
The HTML content of the recipe page.
The original URL (used for host detection and relative URLs).
Optionaloptions: ScrapeOptionsOptional scraping options.
A result object with either the scraped recipe data or an error.
Gets a list of all supported recipe website hosts.
Note: On iOS and Web, this returns an empty array as they use generic schema.org parsing.
A result object with an array of supported host domains.
Checks if a specific host is in the supported list.
Note: Even if a host is not in the supported list, scraping may still work if the site uses schema.org recipe markup. On iOS and Web, this always returns false as they use generic schema.org parsing.
Domain to check (e.g., "allrecipes.com").
A result object with a boolean indicating support.
Scrapes a recipe from an authentication-protected URL.
Logs into the site using provided credentials and scrapes the recipe.
The recipe page URL to scrape.
Username/email for authentication.
Password for authentication.
Optionaloptions: ScrapeOptionsOptional scraping options.
A result object with either the scraped recipe data or an error.
Gets a list of hosts that support authentication.
Available on Android (via Chaquopy) and iOS (via Pyodide WebView). Returns an empty array on unsupported platforms.
A result object with an array of host domains supporting auth.
PrivatedetectDetect if a page requires authentication. Checks for login URL patterns and page title keywords.
PrivateauthPrivateerrorPrivateexceptionChecks if the Python runtime is ready for scraping.
On Android, returns true once Chaquopy Python has finished initializing. On iOS, returns true once Pyodide WebView has finished loading. On Web, this always returns true (no Python needed).
true if ready, false if still initializing.
Waits for Python to be ready for scraping.
Call this during app initialization to ensure Python is loaded before allowing users to access web parsing features.
Maximum time to wait (default: 30000ms)
Time between checks (default: 100ms)
true if ready, false if timeout reached
Recipe scraper class providing access to recipe scraping.
This class wraps the platform-specific implementation and provides type-safe result handling. Supported on Android, iOS, and Web.