debug(schematics): log project page title and HTML snippet
All checks were successful
Deploy to Docker / deploy (push) Successful in 1m30s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-17 02:22:09 +00:00
parent ddc1dc2751
commit 8df13c3164

View File

@@ -123,7 +123,10 @@ export async function fetchSchematic(url) {
throw new Error(`Failed to fetch project page: ${err.message}`); throw new Error(`Failed to fetch project page: ${err.message}`);
} }
// Debug: log download-related links found on the project page // Debug: log project page info
const projTitle = html.match(/<title>([^<]*)<\/title>/i);
log(TAG, `Project page title: "${projTitle?.[1] || 'NONE'}", HTML length: ${html.length}`);
log(TAG, `Project page snippet (500-1500): ${html.slice(500, 1500).replace(/\n/g, ' ')}`);
const dlLinks = html.match(/href="[^"]*download[^"]*"/gi) || []; const dlLinks = html.match(/href="[^"]*download[^"]*"/gi) || [];
log(TAG, `Project page download links: ${dlLinks.length}${dlLinks.slice(0, 10).join(', ')}`); log(TAG, `Project page download links: ${dlLinks.length}${dlLinks.slice(0, 10).join(', ')}`);
// Also check for any schematic/schem references // Also check for any schematic/schem references