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,38 @@
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: false });
const page = await browser.newPage();
await page.goto('https://forms.skyslope.com/?tab=all', { waitUntil: 'domcontentloaded', timeout: 30_000 });
// Wait for JS to render
await page.waitForTimeout(5000);
console.log('URL:', page.url());
await page.screenshot({ path: 'scripts/debug-forms-rendered.png', fullPage: false });
console.log('Screenshot saved');
// Look for form items
const bodyText = await page.locator('body').innerText().catch(() => '');
console.log('Page text (first 500 chars):', bodyText.slice(0, 500));
// Look for any list items or cards
const items = await page.locator('[class*="form"], [class*="Form"], [class*="item"], [class*="card"]').count();
console.log('Form-like elements:', items);
// Look for the NRDS/authorization prompt
const hasNRDS = bodyText.toLowerCase().includes('nrds') || bodyText.toLowerCase().includes('authorization');
console.log('Has NRDS/auth prompt:', hasNRDS);
// Check if we're on a tab with forms
const tabs = await page.locator('[role="tab"]').all();
for (const tab of tabs) {
console.log('Tab:', await tab.textContent());
}
await page.waitForTimeout(2000);
await browser.close();
})();