Configure & Run Scraper
{/* Mode toggle */}
setMode('single')}
style={{ padding: '6px 16px', borderRadius: 8, background: mode === 'single' ? 'var(--accent)' : 'var(--surface2)', color: mode === 'single' ? '#fff' : 'var(--text-muted)', border: '1px solid var(--border)' }}
>Single URL
setMode('bulk')}
style={{ padding: '6px 16px', borderRadius: 8, background: mode === 'bulk' ? 'var(--accent)' : 'var(--surface2)', color: mode === 'bulk' ? '#fff' : 'var(--text-muted)', border: '1px solid var(--border)' }}
>Bulk URLs
{mode === 'single' ? (
Website URL
setUrl(e.target.value)}
placeholder="https://example.com"
onKeyDown={e => e.key === 'Enter' && handleScrape()}
/>
) : (
URLs (one per line)
)}
{/* Config checkboxes */}
{[
['extract_emails', '📧 Extract Emails'],
['extract_phones', '📞 Extract Phones'],
['extract_company_name', '🏢 Extract Company Name'],
['follow_links', '🔗 Follow Internal Links'],
].map(([key, label]) => (
setConfig(c => ({ ...c, [key]: e.target.checked }))}
/>
{label}
))}
{config.follow_links && (
Max Pages to Crawl
setConfig(c => ({ ...c, max_pages: parseInt(e.target.value) || 1 }))}
/>
)}
{error &&
{error}
}
{success &&
✅ {success}
}
{loading ? : '🔍 Start Scraping'}