(event, filePath)
| 7472 | |
| 7473 | // Update the fetch-thangs-page handler |
| 7474 | ipcMain.handle('fetch-thangs-page', async (event, url) => { |
| 7475 | try { |
| 7476 | if (!fetch) { |
| 7477 | throw new Error('Fetch not initialized'); |
| 7478 | } |
| 7479 | console.log('Fetching Thangs page:', url); |
| 7480 | |
| 7481 | const browser = await puppeteer.launch({ |
| 7482 | headless: 'new' // Use new headless mode |
| 7483 | }); |
| 7484 | |
| 7485 | const page = await browser.newPage(); |
| 7486 | await page.goto(url, { waitUntil: 'networkidle0' }); |
| 7487 | |
| 7488 | // Get and log the full HTML source |
| 7489 | const htmlContent = await page.content(); |
| 7490 | console.log('Page HTML:', htmlContent); |
| 7491 | |
| 7492 | // Extract the data |
| 7493 | const data = await page.evaluate(() => { |
| 7494 | // Get model title (which will be the parent model) |
nothing calls this directly
no test coverage detected