feat: Add stale process monitor, users route, landing page, archive old scripts
- Add backend stale process monitoring API (/api/stale-processes) - Add users management route - Add frontend landing page and stale process monitor UI on /scraper-tools - Move old development scripts to backend/archive/ - Update frontend build with new features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
47
backend/archive/inspect-treez-structure.ts
Normal file
47
backend/archive/inspect-treez-structure.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { chromium } from 'playwright';
|
||||
|
||||
const GOOGLE_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
|
||||
|
||||
async function main() {
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const context = await browser.newContext({
|
||||
userAgent: GOOGLE_UA
|
||||
});
|
||||
|
||||
const page = await context.newPage();
|
||||
|
||||
try {
|
||||
console.log('Loading menu page...');
|
||||
await page.goto('https://best.treez.io/onlinemenu/?customerType=ADULT', {
|
||||
waitUntil: 'networkidle',
|
||||
timeout: 30000
|
||||
});
|
||||
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
// Get first 3 menu items and inspect their HTML structure
|
||||
const menuItems = await page.locator('.menu-item').all();
|
||||
|
||||
console.log(`\nFound ${menuItems.length} menu items. Inspecting first 3:\n`);
|
||||
|
||||
for (let i = 0; i < Math.min(3, menuItems.length); i++) {
|
||||
const item = menuItems[i];
|
||||
const html = await item.innerHTML();
|
||||
const text = await item.textContent();
|
||||
|
||||
console.log(`\n========== ITEM ${i + 1} ==========`);
|
||||
console.log('HTML:');
|
||||
console.log(html);
|
||||
console.log('\nText Content:');
|
||||
console.log(text);
|
||||
console.log('='.repeat(40));
|
||||
}
|
||||
|
||||
} catch (error: any) {
|
||||
console.error('Error:', error.message);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
Reference in New Issue
Block a user