wip: skyslope scraper — fix name extraction via body text parsing, preview+download flow ready
This commit is contained in:
28
teressa-copeland-homes/scripts/debug-inspect2.ts
Normal file
28
teressa-copeland-homes/scripts/debug-inspect2.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { chromium } from 'playwright';
|
||||
import { config } from 'dotenv';
|
||||
import path from 'path';
|
||||
config({ path: path.resolve(process.cwd(), '.env.local') });
|
||||
|
||||
(async () => {
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const page = await browser.newPage();
|
||||
|
||||
// Try the direct forms app URL first
|
||||
await page.goto('https://forms.skyslope.com', { waitUntil: 'domcontentloaded', timeout: 30_000 });
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('URL after goto forms.skyslope.com:', page.url());
|
||||
await page.screenshot({ path: 'scripts/debug-forms-home.png' });
|
||||
|
||||
// Look for any login/sign-in link
|
||||
const loginLinks = await page.locator('a, button').all();
|
||||
for (const el of loginLinks) {
|
||||
const text = await el.textContent().catch(() => '');
|
||||
const href = await el.getAttribute('href').catch(() => '');
|
||||
if (/login|sign.?in|log.?in|get started|access/i.test(text + href)) {
|
||||
console.log('Found login element:', text?.trim().slice(0,60), href?.slice(0,80));
|
||||
}
|
||||
}
|
||||
|
||||
await browser.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user