Compare commits
2 Commits
v2026.01.0
...
v2026.01.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
022d0c9529 | ||
|
|
e20be988ce |
@@ -2,7 +2,7 @@
|
||||
"""
|
||||
Recipe scraper script using the recipe-scrapers library.
|
||||
This script is called by the Node.js API to scrape recipes from URLs.
|
||||
Uses wild mode (supported_only=False) to work with any website, not just officially supported ones.
|
||||
Uses wild mode (supported_only=False) to work with any website that uses schema.org structured data.
|
||||
"""
|
||||
|
||||
import sys
|
||||
@@ -52,8 +52,8 @@ def scrape_recipe(url):
|
||||
html = fetch_html(url)
|
||||
|
||||
# Use scrape_html to scrape the recipe
|
||||
# Works with officially supported websites
|
||||
scraper = scrape_html(html, org_url=url)
|
||||
# supported_only=False enables wild mode for any website with schema.org data
|
||||
scraper = scrape_html(html, org_url=url, supported_only=False)
|
||||
|
||||
# Extract recipe data with safe extraction
|
||||
recipe_data = {
|
||||
|
||||
@@ -51,6 +51,11 @@ export class StorageService {
|
||||
}
|
||||
|
||||
async deleteFile(fileUrl: string): Promise<void> {
|
||||
// Skip deletion if this is an external URL (from imported recipes)
|
||||
if (fileUrl.startsWith('http://') || fileUrl.startsWith('https://')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (storageConfig.type === 'local') {
|
||||
const basePath = storageConfig.localPath || './uploads';
|
||||
const filePath = path.join(basePath, fileUrl.replace('/uploads/', ''));
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
* Example: 2026.01.002 (January 2026, patch 2), 2026.02.003 (February 2026, patch 3)
|
||||
* Month and patch are zero-padded. Patch increments with each deployment in a month.
|
||||
*/
|
||||
export const APP_VERSION = '2026.01.002';
|
||||
export const APP_VERSION = '2026.01.003';
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
* Example: 2026.01.002 (January 2026, patch 2), 2026.02.003 (February 2026, patch 3)
|
||||
* Month and patch are zero-padded. Patch increments with each deployment in a month.
|
||||
*/
|
||||
export const APP_VERSION = '2026.01.002';
|
||||
export const APP_VERSION = '2026.01.003';
|
||||
|
||||
Reference in New Issue
Block a user