diff --git a/src/schematics.js b/src/schematics.js index 24d42f8..8f4b706 100644 --- a/src/schematics.js +++ b/src/schematics.js @@ -123,6 +123,16 @@ export async function fetchSchematic(url) { throw new Error(`Failed to fetch project page: ${err.message}`); } + // Debug: log download-related links found on the project page + const dlLinks = html.match(/href="[^"]*download[^"]*"/gi) || []; + log(TAG, `Project page download links: ${dlLinks.length} — ${dlLinks.slice(0, 10).join(', ')}`); + // Also check for any schematic/schem references + const schemRefs = html.match(/\.(schematic|schem|litematic|nbt)/gi) || []; + log(TAG, `Schematic file references: ${schemRefs.length} — ${[...new Set(schemRefs)].join(', ')}`); + // Check for share type / download section + const shareMatch = html.match(/download\/([^/"]+)/g) || []; + log(TAG, `Download path types: ${[...new Set(shareMatch)].join(', ')}`); + // Extract metadata const titleMatch = html.match(/([^<]+)<\/title>/i); const name = titleMatch