chore: sync with Gitea master and restore local-only files
Reset local main to gitea/master (new source of truth) and restored local-only files: web scrapers, admin dashboard, ChromaDB integration, debug scripts, and utility libraries that aren't tracked in Gitea. Gitea master adds: discovermass, buscarmisas-network, hk-parishes, bohosluzby, kerknet, gottesdienstzeiten, miserend importers, ClaimRequest model, forward geocoding, heartbeat healthcheck. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
36
scripts/debug/test-masstimes-api.ts
Normal file
36
scripts/debug/test-masstimes-api.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Quick test script to verify the masstimes.org JSON API scraper works
|
||||
* Usage: npx tsx scripts/test-masstimes-api.ts
|
||||
*/
|
||||
|
||||
import { writeFileSync } from 'fs';
|
||||
import { MassTimesScraper } from '../../src/lib/masstimes-scraper';
|
||||
|
||||
async function main() {
|
||||
console.log('Testing MassTimes.org JSON API Scraper\n');
|
||||
|
||||
const scraper = new MassTimesScraper();
|
||||
|
||||
try {
|
||||
await scraper.init();
|
||||
console.log('Browser initialized\n');
|
||||
|
||||
const lat = 34.852;
|
||||
const lng = -82.394;
|
||||
console.log(`Fetching churches near Greenville, SC (${lat}, ${lng})...\n`);
|
||||
|
||||
const churches = await scraper.scrapeByLocation(lat, lng);
|
||||
|
||||
const outPath = 'scraped-churches.json';
|
||||
writeFileSync(outPath, JSON.stringify(churches, null, 2));
|
||||
console.log(`\nSaved ${churches.length} churches to ${outPath}`);
|
||||
|
||||
} catch (error) {
|
||||
console.error('TEST FAILED:', error);
|
||||
process.exit(1);
|
||||
} finally {
|
||||
await scraper.close();
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user