wip: skyslope scraper — fix name extraction via body text parsing, preview+download flow ready

This commit is contained in:
Chandler Copeland
2026-03-19 23:06:17 -06:00
parent 1983f2c8cd
commit ac5b98fe33
21 changed files with 497 additions and 156 deletions

View 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();
})();